Alright, I basicly have my project done. I got it to spam 2 textboxes, each 5 times, then switching to the other.
Now the problem is, when I press F4, the program doesnt seem to stop. it just keeps spamming. heres the code, can any1 tell me whats wrong.
Code:Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer Dim intCtr As Integer Dim intCbr As Integer Private Sub Timer1_Timer() If GetKeyPress(vbKeyF3) Then intCtr = 0 intCbr = 0 Timer3.Enabled = True If GetKeyPress(vbKeyF5) Then intCtr = 0 intCbr = 0 Timer3.Enabled = False End If End If End Sub Private Sub Timer2_Timer() intCbr = intCbr + 1 'Special Cant tell Code -_- If intCbr = 5 Then Timer2.Enabled = False intCbr = 0 Timer3.Enabled = True End If End Sub Private Sub Timer3_Timer() intCtr = intCtr + 1 'Special Cant tell Code -_- If intCtr = 5 Then Timer3.Enabled = False intCtr = 0 Timer2.Enabled = True End If End Sub




Reply With Quote