RAD Studio
ContentsIndex
PreviousUpNext
Hiding the Main Form

You can prevent the main form from appearing when your application starts by using the global Application variable.

To hide the main form at startup:

  1. Choose ProjectView 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 runtime as in the previous example.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!