Private blnFlag As Boolean
Private intKeyCode As Integer
Private Sub Поле_Exit(Cancel As Integer)
Select Case True
Case ((intKeyCode = 40) And blnFlag)
SendKeys "^{END}"
Case ((intKeyCode = 38) And blnFlag)
SendKeys "^{HOME}"
End Select
Cancel = blnFlag
End Sub
Private Sub Поле_KeyDown(KeyCode As Integer, Shift As Integer)
intKeyCode = KeyCode
Select Case KeyCode
Case 37, 38, 39, 40
blnFlag = True
Case Else
blnFlag = False
End Select
End Sub
Private Sub Поле_KeyUp(KeyCode As Integer, Shift As Integer)
blnFlag = False
End Sub
|