I am trying to write a vb.net application that watches for a specific key. When the key is pressed it performs a specific action. The problem is that i want to watch for this key while the program does not have focus and the program is in the system tray.
I found some code that kind of allows me to do this, but it is for blocking the OS from receiving these keys. In order to block them the code uses some pretty advanced API's and the entire computer hangs for a few seconds while the program is receiving those keys. I modified the code to perform an anction instead of blocking the keys, but the program still hangs often.
Is there an easier way to perfrom an action when a key is pressed if i don't want to block the OS from receiving the keys?