Я исползовал собитие KeyDown формы но не работает.
привожу код:
- Код: Выделить всё
Option Explicit
' SetCursorPos
Private Declare Function SetCursorPos Lib "user32.dll" (ByVal x As Long, ByVal y As Long) As Long
' Tipi Cursoris poziciis shesanaxad
Private Type CURPOS
x As Long
y As Long
End Type
' Zemot agtserili tipis masivi
Private cp(4000) As CURPOS
Private idx As Long
Private last_idx As Long
Private Fname As String
Private Sub Command1_Click()
Fname = App.Path & "\Cur.Dat"
Open Fname For Binary As #1
Get #1, , cp
Close #1
idx = 0
last_idx = 1452
'Cursoris modzraoba
Timer1.Enabled = True
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
' masivis mixedvit kursoris pozisiis shetsvla
idx = idx + 1
Call SetCursorPos(cp(idx).x, cp(idx).y)
' Tu masivis bolo elementia mashin
' tavidan vitskebt
If idx = last_idx Then idx = 0
DoEvents
End Sub
заранее спасибо