(VB or C#) Run app in system tray and listen to keyboard input even when the app is not in focus

Posted by Avinash Sonee on Stack Overflow See other posts from Stack Overflow or by Avinash Sonee
Published on 2010-03-28T20:14:55Z Indexed on 2010/03/28 20:23 UTC
Read the original article Hit count: 212

Filed under:
|
|

I want to make an app which on loading sits in the system tray and even after I open another program (say notepad or vlc or anything) i.e. even when the app is not in focus and if I press "G" on my keyboard, the tray icon should show a tool tip - "key G is pressed". I have tried several codes but nothing works when the app goes out of focus. I can use Register Hot Key (http://msdn.microsoft.com/en-us/library/ms646309(VS.85).aspx) but it needs a modifier also (like Ctrl or Alt etc. along with my key G). So, is there any way I can achieve this? something which many tray icons do like antivirus apps, etc. and I do not want to use AutoHotkey application. I want to build one but need some help. Thanks!

© Stack Overflow or respective owner

Related posts about vb

Related posts about c#