How do I make hotkeys for my application? Will they work if the application hasn't got the focus?
I tried searching this site for Hotkeys, but I don't like downloading demo apps.
Printable View
How do I make hotkeys for my application? Will they work if the application hasn't got the focus?
I tried searching this site for Hotkeys, but I don't like downloading demo apps.
In the help book for vb, you should have key code constants.
say you wanted the letter S to be your hotkey:
Put this in form_keydown:
If keycode = vbkeyS then
Msgbox "You pressed S."
Else
Msgbox "You pressed some other button."
End If
I don't think you can press a hotkey and have the program respond without having focus.
I remember seeing it somewhere on an API guide site, but I didn't think it would come in handy, so I just forgot about it until I needed it.