keyboard input retriving help !

Hi everybody, im new to visual basic (and to programming).

I want to create a program that gose in the system tray and that i can pop back form a shorcut. For exemple, im anywere in my pc, i touch ctrl + t and my program pop-up. Can you help me in the way to achieve that

Thanks

Pat


Answer this question

keyboard input retriving help !

  • CoderD

    No, you don't need to do that 'subclassing'. You need to set a system-wide keyboard hook. Have a search on Keyboard Hooking. It uses Win32 API calls, and can be quite delicate to troubleshoot (as with most API calls); there aren't any native VB calls to do this. Also note that low-level keyboard hooking can make your system unstable, or inoperable if done incorrectly, so ensure you debug it thouroughly, and are careful with it.

  • Linkin

    take a look at this on how to place your app in the systray:

    http://msdn2.microsoft.com/en-us/library/system.windows.forms.notifyicon(VS.80).aspx

    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=671461&SiteID=1

    in regards to the "hot key" im not sure, perhaps you are looking at some key hook. There are a few topics about this on the forums which you may need to do a search for but I'm sure the first part of your question has now been answered :-)



  • Nerick

    Are you sure it's the only way. I mean, i work in visual studio 2005 and it's an visual studio 6 project that i can't open anyway. I can look the code in text edit but somebody know if the have another best way to do it in VS.Net 2005 or if it's the only way

  • SGraham1985

    Well the only way u have is Sub Classing buddy this page has sample code also view it

    http://www.planetsourcecode.com/vb/scripts/ShowCode.asp txtCodeId=10141&lngWId=1



  • keyboard input retriving help !