Dim cRow As Long, tRow As Long
Dim curRow As Long, tmpRow As Long
Private Sub MSHFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then Exit Sub
With MSHFlexGrid1
If .MouseRow < .FixedRows Then Exit Sub
If curRow <> tmpRow Then
cRow = .MouseRow
.Row = tRow
If .Row <> 0 And .Col <> 0 Then
For i = .FixedCols To .cols - 1
.Col = i
.CellBackColor = .BackColor
Next
End If
.Row = cRow
For i = .FixedCols To .cols - 1
.Col = i
.CellBackColor = vbBlue
Next
.Col = .MouseCol
tmpRow = curRow
Else
tRow = cRow
curRow = .RowPos(.MouseRow) + .CellHeight
End If
End With
End Sub
Dim cRow As Long, tRow As Long
Dim curRow As Long, tmpRow As Long
Private Sub MSHFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then Exit Sub
With MSHFlexGrid1
If .MouseRow < .FixedRows Then Exit Sub
If curRow <> tmpRow Then
cRow = .MouseRow
.Row = tRow
If .Row <> 0 And .Col <> 0 Then
For i = .FixedCols To .cols - 1
.Col = i
.CellBackColor = .BackColor
Next
End If
.Row = cRow
For i = .FixedCols To .cols - 1
.Col = i
.CellBackColor = vbBlue
Next
tmpRow = curRow
Else
tRow = cRow
curRow = .RowPos(.MouseRow) + .CellHeight
End If
End With
End Sub