Solved

Alt key jumps to main form display

Posted on 2002-06-14
3
278 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks Cynna - that does just what I want - Dan
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 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

17 Experts available now in Live!

Get 1:1 Help Now