重写datagrid(禁止对列宽进行拖拽)[5]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 hanmo 的 blog

 

    protected overrides sub onmousemove(byval e as system.windows.forms.mouseeventargs)

        dim hti as datagrid.hittestinfo = me.hittest(new point(e.x, e.y))

        '如果鼠标事件类型为改变列宽则返回

        if hti.type = datagrid.hittesttype.columnresize then

            cursor.current = cursors.default

            return

        end if

        mybase.onmousemove(e)

    end sub

end class

本文关键:重写datagrid(禁止对列宽进行拖拽)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top