Mega Code Archive

 
Categories / Delphi / Forms
 

Show the mainform as a dialog with a mainmenu

Title: show the mainform as a dialog with a mainmenu? (* --- english ------------------------------------------------------------------- If you want to show your mainform as a dialog (setting BorderStyle := bsDialog) and don't want to miss your main menu... --- german -------------------------------------------------------------------- Wer die Hauptform auf BorderStyle := bsDialog gesetzt hat und dennoch ein TMainMenu haben möchte kann das Handle von TMainMenu nachträglich wieder aktivieren. *) procedure TMain.FormCreate(Sender: TObject); begin //... Windows.SetMenu(Handle, MainMenu1.Handle); end;