I want to remove or disable the buttons inside the main menu, that controls the child form (minimize, restore), of my application.
The application should look like a "browser", where the MDI child forms must stay maximized all the time.
I alreday tried to disable they, by setting
BoderIcons := [biSystemMenu];
But I got this:
I alreday tried to disable the menu commands at the WM_INITMENU message, but without success:
procedure WMInitMenu(var Message: TWMInitMenu); message WM_INITMENU;
procedure TMyMDIChildForm.WMInitMenu(var Message: TWMInitMenu);
begin
inherited;
EnableMenuItem(Message.Menu, SC_MAXIMIZE, MF_BYCOMMAND or MF_GRAYED);
EnableMenuItem(Message.Menu, SC_MINIMIZE, MF_BYCOMMAND or MF_GRAYED);
end;
I'm using:
- Delphi 7.1 Enterprise
- Windows 7 Pro x64