Q:

Hotkey not working when showintaskbar set is false

I'm using RegisterHotKey to set the global keyboard shortcut, and it works if the main form is visible or minimized. But if the form showintaskbar set is false dont work hotkey. 
Any ideas?
source code

A:

You have to register the hotkey AFTER you set the
ShowInTaskbar state. Converserly, if you later toggle the ShowInTaskbar
state, you need to reregister the hotkey. Something about changing the
ShowInTaskbar state disables the hotkey.

