Solved

Opening App with Keyboard Only

Posted on 1998-06-30
3
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

752 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