Solved

Alt key jumps to main form display

Posted on 2002-06-14
3
280 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 100 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

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