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

x
?
Solved

Alt key jumps to main form display

Posted on 2002-06-14
3
Medium Priority
?
290 Views
Last Modified: 2011-11-08
In any program where I have multiple full screen forms the Alt key  jumps me to the main form when I am on another form. The programs are Delphi programs but I guess that this is a windows feature.

Is there any way of turning this effect off so that clicking the Alt key does not show the main form?

thanks - Dan
0
Comment
Question by:seabear
3 Comments
 
LVL 9

Expert Comment

by:ginsonic
ID: 7080084
Maybe in OnKeyPress procedure check if ALT is pressed and if is then set key:=0 ?!
0
 
LVL 7

Accepted Solution

by:
Cynna earned 400 total points
ID: 7080675
seabear,

You should supress ALT key down event for entire application.
It can be done via global message handler on application level.

This will solve your problem:

1. Create application event handler:
----------------------------------------------------------

procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean);
begin
  with Msg do
    if (message=WM_SYSKEYDOWN) and (wParam=VK_MENU) then Handled := True;
end;

(don't forget to declare it in private section of Form1)

2. Assign it to application object in main forms FormCreate event:
-----------------------------------------------------------------------------------------------

procedure TForm1.FormCreate(Sender: TObject);
begin
  Application.OnMessage := AppMessage;
end;
0
 

Author Comment

by:seabear
ID: 7082101
Thanks Cynna - that does just what I want - Dan
0

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

773 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