Solved

REMOVE FORMS SYSTEMMENU

Posted on 2002-07-11
3
187 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 50 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

690 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