Results 1 to 7 of 7

Thread: Key is down or up? *resolved*

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Dmitri K's Avatar
    Join Date
    Sep 2002
    Location
    West Palm Beach, FL
    Posts
    444

    Key is down or up? *resolved*

    Following code is in the timer with interval set to 100
    VB Code:
    1. If GetAsyncKeyState(VK_F12) Then
    2. ....
    3. num = num + 1
    4. end if
    The problem is if i keep F12 down without releasing it, num will increase by 1 every 100 milliseconds. Is there anyway to make it work so num = num + 1 will ONLY execute when F12 has been released, so if I press F12 when num = 0, num will stay 0 until I depress F12, and when I press it again num will equal to 1, and so on. With each key press num will increase by 1, but with continuous key press, num will not change.
    Last edited by Dmitri K; Mar 21st, 2003 at 07:57 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width