Hiding the Main Form

From RAD Studio
Jump to: navigation, search

Go Up to Using the Main Form

You can prevent the main form from appearing when your application starts Working at the Application Level.

To hide the main form at startup

  1. Choose Project > View Source to display the main project file.
  2. Add the following code after the call to Application.CreateForm() and before the call to Application.Run().
Application.ShowMainForm := False;
Form1.Visible := False; { the name of your main form may differ }
Application->ShowMainForm = false;

Note: You can set the form's Visible property to False using the Object Inspector at design time rather than setting it at run-time as in the previous example.

See Also