Results 1 to 5 of 5

Thread: Assign Global Shortcut Keys [solved]

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    384

    Resolved Assign Global Shortcut Keys [solved]

    Hello!
    I have a program where people must choose a shortcut key for that program. The problem is that it must be global, so, in other words, I want to say Nero has a Shortcut Key of Ctrl+Alt+N in my program, then it must be applied system wide. For example, If you right click on a desktop Icon, select properties, then select Shortcut - there you can assign a global shortcut to that particular program. I want to be able to assign a shortcut to a program, and it must be applied system wide.
    Any ideas?
    Last edited by GrimmReaper; Jan 25th, 2006 at 07:27 AM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Assign Global Shortcut Keys

    You would need to use a keyboard hook I think, although I have a vague memory of having seen a more direct method. You could check out the SetWindowsHookEx API function on MSDN and also do a forum search for the same, as I'm sure there would be examples of using it posted.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    384

    Re: Assign Global Shortcut Keys

    I got the solution here!
    http://www.thecodeproject.com/vb/net/mclhotkeynet.asp

    Thanx everyone!

  4. #4
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: Assign Global Shortcut Keys [solved]

    That will work (to respond to a key press system wide) if your application is running but my understanding of you requirement was for the key press to launch your application?

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2005
    Posts
    384

    Re: Assign Global Shortcut Keys [solved]

    Quote Originally Posted by Merrion
    That will work (to respond to a key press system wide) if your application is running but my understanding of you requirement was for the key press to launch your application?
    My application will be running in the background. i n other words, it's will function like the quick launch toolbar. I click a linkbutton, then, the app will appear, or I press one of the global shortcuts, the applications will launch.
    Tired and tested and works!

    Thanx tho!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width