读书人

右键使用有关问题

发布时间: 2012-02-28 13:06:35 作者: rapoo

右键使用问题,高手请进!!
如何在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

读书人网 >VB

热点推荐