|
-
Jun 14th, 2002, 01:12 PM
#1
Thread Starter
Fanatic Member
Using GetAsyncKeyState() ...
Hi,
I have a question,
How can I use the GetAsyncKeyState() function to do a one pressing key like i'll press space and it will work just once but i'm still holding the space bar. it will do it again when i'll release the space bar and then press it again. How can I do it? Any code?
Thank you,
Arie.
now.at/daymgr
-
Jun 16th, 2002, 02:51 PM
#2
Thread Starter
Fanatic Member
No one knows?
Try again, Please help me,
Arie.
now.at/daymgr
-
Jun 16th, 2002, 04:14 PM
#3
Frenzied Member
It's really easy 
Here's some pseudo-code:
VB Code:
Static PressingKeyLastTime as Boolean
If Not PressingKeyLastTime Then
If GetAsyncKeyState(KEY) Then
PressingKeyLastTime = True
'Do Something :)
End If
Else
If Not GetAsyncKeyState(KEY) Then
PressingKeyLastTime = False
End If
End If
-
Jun 17th, 2002, 05:21 PM
#4
Frenzied Member
You're welcome
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|