标签:color 使用 数据 io for cti 代码 div
在vb6中要显示数据虽然有datagrid、msflexgrid、mshflexgrid、vsflexgrid、True dbgrid7.0 可选,不过我在工作中用的最多的还是MSHFlexGrid,以下我会常分享一些使用这个控件的技巧、方法代码,保证拿了就可以用。
‘禁止mshflexgrid选择多行记录
‘第一种方法
Private Sub MSHFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If MSHFlexGrid1.RowSel <> MSHFlexGrid1.Row Then MSHFlexGrid1.RowSel = MSHFlexGrid1.Row
End Sub
‘第二种方法
Private Sub msh_Data_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If msh_Data.MouseRow = 0 Then Exit Sub
With msh_Data
.Row = .MouseRow
CURRENTROW = .Row
.Col = 0 ‘如果是0则可以不选择多行
.ColSel = .Cols - 1
End With
End Sub
Private Sub msh_Data_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If msh_Data.MouseRow = 0 Then Exit Sub
With msh_Data
.RowSel = CURRENTROW
.ColSel = .Cols - 1
End With
End Sub
VB6-表格控件MSHFlexGrid 实用代码,布布扣,bubuko.com
标签:color 使用 数据 io for cti 代码 div
原文地址:http://www.cnblogs.com/yhsc/p/3874267.html