Results 1 to 14 of 14

Thread: [RESOLVED] Detect a Hot Key without looping

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member TupacShakur's Avatar
    Join Date
    Mar 2002
    Location
    Da Land Of Da Heartless...
    Posts
    493

    Resolved [RESOLVED] Detect a Hot Key without looping

    Once again i find myself seaking the help of the experienced guys in here

    However, this will pose a challenge for u guys. I have searched and read more code than the average human brain can handle in a 3 hours span, but found no solution to my need:

    What i need to do is to create a system wide hot key for my app that can be detected when my app is inactive. But the crucial part is that i need to detect that key when it's pressed without using the classical DoEvents based loop (which by the way is the most inadequate commonly used programming practice in VB) !!

    I came to the conclusion that this canot be done using GetAsyncKeyState (cause this would require looping), but probably could be done using sub classing, which i have no idea about. I am not sure also if sub classing should be used with the RegisterHotKey API or not, and if there is some other way to use the HotKey API to set some kind of event that will be triggered when the hot key is pressed (an event that will be detected by the system, just like how events are set in Java or C++, and not through a loop from within my code)???

    He who helps me will be generously awarded!!!!
    Last edited by TupacShakur; Mar 23rd, 2006 at 06:51 PM.
    "And Now I'm Lika Major Threat, Cause I Remind U Of The Things U Were Made To Forget!" - (2PAC)

    "Now They Label Me a Lunatic, Couldn't Care Less, Death or Success is What I Quest, Cause I'm Fearless!" - (2PAC)

    " There's a light at the end of every tunnel, just pray it's not a train!! "



    I am 100% addicted to Tupac. What about you?
    I am 24% addicted to Counterstrike. What about you?
    The #1 Tupac Fans Web Site | The Official Tupac Web Site

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