Solved

REMOVE FORMS SYSTEMMENU

Posted on 2002-07-11
3
181 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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 133
Delphi: how to implement a User Shortcut mapper? 1 110
Magic Software info 18 132
how to change, disabled button color FMX ? 1 33
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 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