Author: William Gerbert
I need to display a menu in the expert's "main" form. Now this form was created
with TForm1.Create() and therefore not an application's main window.
Although the menu is displayed in design mode properly, at runtime it will not
appear. Even manually assigning the menu with Menu := MainMenu will not help.
Use the API function SetMenu in the FormCreate handler as shown below:
1 procedure TForm1.FormCreate(Sender: TObject);
2 var3 h: integer;
4 begin5 h := ClientHeight;
6 SetMenu(Handle, MainMenu1.Handle);
7 ClientHeight := h;