Keypress not working...

Hello, i'v been coding a computer assistant type program that runs in the background. When i press a certain key it pulls up the program and when i press it again it hides it. It worked fine until i put it in the startup programs so when my computer starts up it will run it in the background. When i press the key the program wont come up.
Last edited on
unless it has a system-wide hook your program will need to be the active window for the message pump to capture keystrokes.
Check out RegisterHotKey function, your window does not need to be active to receive the WM_HOTKEY message.
Thanks bro ill look into it.

That fixed it. I swapped it out with the regesterhotkey function and it works on bootup. Thanks for the great help! :)
Last edited on
Topic archived. No new replies allowed.