首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

右键使用有关问题,

2012-02-28 
右键使用问题,高手请进!!如何在mshflexgrid控件的mousedown()事件中获取,mshflexgrid控件中的任意一行中,

右键使用问题,高手请进!!
如何在mshflexgrid控件的mousedown()事件中获取,mshflexgrid控件中的任意一行中,第一列的数值,我有个简单的程序,但是在单击右键的时候只能获得第一行的数值,请高手小弟我改改。


Private   Sub   mshflexgrid1_MouseDown(Button   As   Integer,   Shift   As   Integer,   x   As   Single,   y   As   Single)

Label3   =   gengx
If   Button   =   2   Then
datashow.PopupMenu   popm,   0,   x,   y
gengx   =   mshflexgrid1.TextMatrix(mshflexgrid1.RowSel,   1)
End   If
End   Sub



[解决办法]
Private Sub mshflexgrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)

Label3 = gengx
If Button = 2 Then
datashow.PopupMenu popm, 0, x, y
gengx = mshflexgrid1.TextMatrix(mshflexgrid1.mouseRow, 1)
End If
End Sub

热点排行