Solved

Alt key jumps to main form display

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 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