?
Solved

REMOVE FORMS SYSTEMMENU

Posted on 2002-07-11
3
Medium Priority
?
189 Views
Last Modified: 2010-04-04
REMOVE FORMS SYSTEMMENU

How to remove forms systemmenu (popup) without removing or disabling forms system buttons ?

Thanks.
0
Comment
Question by:vbmn
[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
  • 2
3 Comments
 
LVL 7

Expert Comment

by:Cynna
ID: 7147498
Just supress SC_KEYMENU, SC_MOUSEMENU system command type of
WM_SYSCOMMAND message. They are responsible for sys menu poping out.

Assume you want to do this for Form2:


type
  TForm2 = class(TForm)
// .....
  private
    { Private declarations }
     procedure WMSysCommand( var msg: TWMSysCommand ); message WM_SYSCOMMAND;
// .....


implementation


// .....

procedure TForm2.WMSysCommand(var msg: TWMSysCommand);
begin
  case msg.CmdType and $FFF0 of
    SC_KEYMENU, SC_MOUSEMENU: begin
      msg.result := 0; // Eat this message
      Exit;
    end
  end;
  inherited;
end;

0
 
LVL 3

Accepted Solution

by:
LukA_YJK earned 200 total points
ID: 7148482
If I understood correctly you should write

Procedure TForm1.DestroySysMenu;
var mnu: HMNU;
begin
  mnu := GetSystemMenu(Handle, True);
  DestroyMenu(mnu);
end;
0
 
LVL 3

Expert Comment

by:LukA_YJK
ID: 7152175
Yay ! Thanks, vbmn !
My first 200 Expert Points !
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

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