Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17



Posted on 1999-07-13
Medium Priority
Last Modified: 2010-04-06
What is the best way to implement a hotkey? My program may be minimized or without focus or even hidden. I would like to press a key combination and have it restored and have focus. Can you have more than one hotkey for other functions? I only have 26 points. I'll keep one.
Question by:CalvinDay
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
  • 2

Expert Comment

ID: 1388184
Hello Calvin

I believe the only hot keys available to your app when it is minimised or doesn't have focus, are those assigned by Windows.

Goto Properties command from context menu of your menu short cut, the enter a hot key in the ShortCut Key field (hold down Alt and press a key).

This shortcut will restore your app if minimised and/or bring it to front if it is not already.


LVL 20

Expert Comment

ID: 1388185
Look at WM_SETHOTKEY and RegisterHotKey. I didn't use any of them yet. So you'll have to test them yourself. Another possibility is the hotkey in the shellLink (lik HTH suggested). Another possibility would be a system wide keyhook dll. Look at the other question (200 points from "Carier" or someone with a similar name to that).

Regards, Madshi.

Author Comment

ID: 1388186
WM_SETHOTKEY and RegisterHotKey seem to work. Madshi, answer this question.
LVL 20

Accepted Solution

Madshi earned 80 total points
ID: 1388187
Thanx, CalvinDay...   :-)

Featured Post

Technology Partners: 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

721 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