Hello,
First of all , ill let u know that english is NOT my first language.
Okay , My problem is:
Im trying to make somekind of timer.... and this timer job is to Tell me when the B key is down
Then i came up with those code
-------------------------------------------------------------------------------------
My problem is, when i click the B button, my timer (interval 1) is flooding me with those Msgbox, while the key was only pressed one time
I added the GetKeyState API because im pretty sure im going to need it... ive tryed multiple things , without success :S
... Wow my english is so lame...
im waiting for ur answer ! thanks
First of all , ill let u know that english is NOT my first language.
Okay , My problem is:
Im trying to make somekind of timer.... and this timer job is to Tell me when the B key is down
Then i came up with those code
Code:
-------------------------------------------------------------------------------------
'In a module
Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
'In a timer
Private Sub Timer2_Timer()
If GetAsyncKeyState(66) Then
msgbox "B"
End If
End If
End Sub
My problem is, when i click the B button, my timer (interval 1) is flooding me with those Msgbox, while the key was only pressed one time
I added the GetKeyState API because im pretty sure im going to need it... ive tryed multiple things , without success :S
... Wow my english is so lame...
im waiting for ur answer ! thanks