Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Delphi Programming question

Posted on 1997-08-29
1
Medium Priority
?
168 Views
Last Modified: 2010-04-06
I would like could capture the  keys CTRL-ESC and CTRL-ALT-SUPR in Win95 from my Delphi program in order to avoid that the user could close applications or throw another without my consent, but I don't find the manner of making it. I have looked at the API and I believe that I should capture the WM_HOTKEY message but I have not been successful.

I would thank if somebody could help me or guide me in it.

Thanks to all.

Kirk.
0
Comment
Question by:kirk9
[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
1 Comment
 
LVL 5

Accepted Solution

by:
ronit051397 earned 100 total points
ID: 1342981
This is from Lloyd's help file. Didn't check it.

Q. How do I override the default message handler for my Application?

A. You create a dynamic method that is indexed to the message constant
   that you want to override.  If you want to override the CM_DIALOGKEY
   message you would declare the following procedure in the public
   section of you class declaration:

   Procedure CMDialogKey(var Message: TCMDialogKey);message CM_DIALOGKEY;

   It is common practice to declare the procedure name the same as the
   message name minus the underscore.  Your message handler would look
   something like this:

   Procedure TForm1.CMDialogKey(var Message: TCMDialogKey);
   begin
     if CharCode = VK_TAB then begin
       {Process the Alt+Tab key here}
       result := 1;

       exit;
     end;
     inherited;
   end;

   Setting result to 1 stops further processing. The inherited
   statement passes control to the parent handler. Be sure to
   execute inherited for all the cases you don't want to handle.
   Do not execute it for the ones you do handle.

{ This code came from Lloyd's help file! }
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

604 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