1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Option Explicit
Private Declare Function GetAsyncKeyState Lib "User32" (ByVal vKey As Long) As Integer
Private Sub Option1_Validate(Index As Integer, Cancel As Boolean)
'quelle touche ?
If GetAsyncKeyState(vbKeyDown) <> 0 Then
Cancel = True
If MSFlexGrid1.Row < MSFlexGrid1.Rows - 1 Then
MSFlexGrid1.Row = MSFlexGrid1.Row + 1
MSFlexGrid1.TopRow = MSFlexGrid1.Row
End If
End If
If GetAsyncKeyState(vbKeyUp) <> 0 Then
Cancel = True
If MSFlexGrid1.Row > MSFlexGrid1.FixedRows Then
MSFlexGrid1.Row = MSFlexGrid1.Row - 1
MSFlexGrid1.TopRow = MSFlexGrid1.Row
End If
End If
End Sub |
Partager