Hotkey without hooks

I wrote an application which I want to activate by pressing a hotkey (F12). Currently, the only solution I found is to use keyboard hooks so I need to use external DLL file for it and I also need to set and remove them. Is there any way to set a hotkey for an application without hooks ? I need it to be "memory resident" and to become active upon pressing the hotkey.

Regards,
     Gilad
gilad_noAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jhanceConnect With a Mentor Commented:
Why don't you use the RegisterHotKey() Windows API function?  As long as your application is running it can call RegisterHotKey() and from then on receive notification that the key was pressed.
0
 
gilad_noAuthor Commented:
Thanks, it works :)
0
All Courses

From novice to tech pro — start learning today.