
22-07-2006, 18:55
|
|
|
|
חבר מתאריך: 19.03.06
הודעות: 5,377
|
|
מקשים אתה יכול לשלוח ע"י הפונקציה SendKeys.
זיהוי מקשים תוכל לבצע ע"י פונקצית ה-API שנקראת GetAsyncKeyState (משהו כזה).
והנה היא:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
תוסיף אותה לאיזור ההגדרות, ואתה יכול לעשות דבר כזה (תוסיף טיימר עם אינטרבל 1000 ו-Enabled = False) :
קוד:
Dim i As Integer
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If GetAsyncKeyState(vbKeyControl) And GetAsyncKeyState(vbKeyAlt) And GetAsyncKeyState(vbKeyF) Then
i = 1
Timer1.Enabled = True
End IF
End Sub
Private Sub Timer1_Timer()
SendKeys i
If i = 3 Then Timer1.Enabled = False
i = i + 1
End Sub
אני בטוח שבמה שכתבתי לך יש לפחות שגיאה אחת, אבל זאת הכוונה סך הכל 
בהצלחה 
_____________________________________
|