vbmn
asked on
REMOVE FORMS SYSTEMMENU
REMOVE FORMS SYSTEMMENU
How to remove forms systemmenu (popup) without removing or disabling forms system buttons ?
Thanks.
How to remove forms systemmenu (popup) without removing or disabling forms system buttons ?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yay ! Thanks, vbmn !
My first 200 Expert Points !
My first 200 Expert Points !
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;