delphi-tips icon indicating copy to clipboard operation
delphi-tips copied to clipboard

New tip: Display main menu dialogue style main form

Open delphidabbler opened this issue 2 years ago • 0 comments

Possible new tip from extra/Topelina Tips.odt


MainFormAsDialog

Show the mainform as a dialog with a mainmenu.

If you want to show your mainform as a dialog (setting BorderStyle := bsDialog) and don't want to miss your main menu...

procedure TMain.FormCreate(Sender: TObject);
begin
  //...
  Windows.SetMenu(Handle, MainMenu1.Handle);
end;

Contributed by: topellina [email protected]

delphidabbler avatar Nov 19 '22 01:11 delphidabbler