Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / May 2004

Tip: Looking for answers? Try searching our database.

Responding to global keyboard shortcuts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Klaus Jensen - 23 May 2004 11:38 GMT
Hi!

I have developed an app, which normally resides in the tray and does stuff
in the background. I would like to make it possible to press a keyboard
shortcut from anywhere in windows/applications and respond to that event.

I have searched high and low on the web, but I guess I do not know excatly
what to look for. :)

Could someone please point me in the direction of an answer? :)

- Klaus Jensen
Jerry Pisk - 23 May 2004 20:37 GMT
I have no idea how to do it in .Net, but in Win32 you need to call
SetWindowsHookEx(WH_KEYBOARD, ...) and pass it your own KeyboardProc that
will be called on keyboard events.

Jerry

> Hi!
>
[quoted text clipped - 8 lines]
>
> - Klaus Jensen
Jakob Christensen - 24 May 2004 13:06 GMT
Hey Klaus

I have previously used a modified version of the MCL .net system-wide hotkey component (http://www.merrioncomputing.com/Download/index.htm).  This component uses P/Invoke to call the Win32 API function RegisterHotKey.  The component contains a few bugs which I have corrected (e.g. it starts "polling" every second after the hotkey has been pressed once and also it does not delete previously registered hotkeys).

Feel free to contact me if you would me to send you the corrected version

Regards, Jakob

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.