Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

REMOVE FORMS SYSTEMMENU

Posted on 2002-07-11
3
Medium Priority
?
194 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

618 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