Solved

Opening App with Keyboard Only

Posted on 1998-06-30
3
149 Views
Last Modified: 2010-05-03
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
Comment
Question by:garymace
3 Comments
 
LVL 18

Expert Comment

by:deighton
ID: 1464607
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
 

Author Comment

by:garymace
ID: 1464608
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
 
LVL 6

Accepted Solution

by:
alamo earned 50 total points
ID: 1464609
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JSON Response and request in VB6 application 11 778
How does CurrentUser work? 10 41
VB6 - Compare and highlight cell not the same 3 56
checkbox to hide entire section 10 58
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question