Coder Profile - Show off your skills, get a coder profile.
 
 
 
code pin board "GetAsyncKeyState" Function Download Source Code
Author Details Code Information
Project7 ( Alin Coop )

Pinned 2 Codes
Posted 0 Coding Articles

Send A Message
View Coders Profile
Language Visual Basic
Expires Never
Length 648 Characters (16 Lines)
Password no password
Description

Describing the "GetASyncKeyState" function.
  1. Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
  2. 'Declare the function
  3.  
  4. Private Sub Timer1_Timer()
  5.      If GetAsyncKeyState(vbKeyA) The
  6.      'Searches for the keypress of the A button.
  7.          msgbox "You pressed the A button", vbInformation + vbOkOnly, "Keypress detected"
  8.      End If
  9. end sub
  10.  
  11. 'An ordinary keypress takes 60 - 70 milliseconds, so that is what my timer is set to,
  12. 'BUT, if you were to hold down, in this case "A", AND, let's say, when you press A, it would open "explorer.exe"
  13. 'It would open "explorer.exe" once every 60 - 70 milliseconds, that's alot of windows.
  14.  
  15.  
  16. 'Alin Coop 2008
code pin board Back To Code Pin Board Post New Code
Please login to post comments.
Page 1 of 1
 
 
Part of the MyPingle Network
Development Blog :: Make A Donation :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents
Version 1.44.00
Copyright © 2007 - 2008, Scott Thompson, All Rights Reserved