Solved

REMOVE FORMS SYSTEMMENU

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
IExtractImage Delphi 14 168
Delphi Form ownership 4 54
Working with hours 3 31
tvirtualstringtree freeze when load too manny images 10 31
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

12 Experts available now in Live!

Get 1:1 Help Now