Solved

Alt key jumps to main form display

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
code issue 8 100
Printing problem 2 80
TServerSocket - file via sendbuf or Text via sendtext ? 1 42
how to send memory stream from ics Client To ics server ? 11 82
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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now