Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

Opening App with Keyboard Only

Hello,

I am writing an small utility for those writing email. My goal is for the user to be able to use this app without taking their hands off the keyboard.

I want to the user to be able to start this program with keystrokes.

So, my question is...is there a way to assign to windows a 'hot-key(s)' that would activate my program. Also, is there a way to edit this 'hot-key' from within my program.

Thanks for any suggestions.

Gary Mace
0
garymace
Asked:
garymace
1 Solution
 
deightonCommented:
1) create an EXE file

2) Right click on windows 95 and create a shortcut icon to the exe

3) Once you have an icon (or if you already made one) right click on the icon, selct properties, then shortcut.  Then select a SHOTCUT KEY e.g. ctrl-alt-G for example
0
 
garymaceAuthor Commented:
3) Once you have an icon (or if you already made one) right click on the icon, selct properties, then shortcut.  Then select a SHOTCUT KEY e.g. ctrl-alt-G for example
-----------------------------------------

Thanks, but is there a way for a user to assign or edit this Short-Cut key from within the program itself?

Gary

0
 
alamoCommented:
The program can create and change a .lnk (and therefore reassign the hotkey) by using the IShellLink object.

The Microsoft Knowledgebase article Q179904 at http://support.microsoft.com/support/kb/articles/Q179/9/04.asp shows how to create a shortcut, and then how to change it (in your case you'd use IShellLink::SetHotkey to set the hotkey). The example isn't precisely what you are trying to do, but it shows you the general process for working with shortcuts.  

Good luck!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now