一、删除MSHFlexGrid控件
中的一行
”添加和删除用户“界面,功能实现方面能遇到问题的应该只有”删除“了,在原程序中我们看到,当我们点击MSHFlexGrid控件中的一行时,会选中这一行,然后点击删除,该条记录就会被删除,这是怎么实现的呢?首先,我们要声明一个变量:
Dim CURRENTROW As Integer
然后,在代码中:
Private Sub MSHFlexGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
With MSHFlexGrid1
.Row = .MouseRow
CURRENTROW = .Row
.Col = 0
.ColSel = .Cols - 1
End With
End Sub
Private Sub MSHFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
With MSHFlexGr