[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TApplication.Run

Loads the form and passes control to the event loop for the application.

Declaration

Source position: forms.pp line 1636

public procedure TApplication.Run;

Description

Run is the method called to start execution of the application. It reimplements the method introduced in TCustomApplication to provide support for the MainForm and processing loop used in a GUI application. The Run method is generally called, via the Application singleton, from the .lpr project file.

If the MainForm property has been assigned, and should be displayed, the AppSetupMainForm method in the widgetset class is called to set the window state for the main form. The Show method in MainForm is also called to scale the form (when needed) to the PixelsPerInch for the monitor. The form is made visible and brought to the top of the Z-Order in the application.

The AppRun method in the widgetset class is called to start the message loop using the private RunLoop method.

See also

TApplication.MainForm

  

Contains the main form for the application.

TApplication.ShowMainForm

  

Allows the main form to be shown or hidden when an application is started.

TApplication.Scaled

  

Indicates if forms and controls in the application can be scaled to different display densities (Pixels per Inch).

Application

  

The TApplication singleton.

TCustomForm.Show

  

Displays the form instance with support for High DPI scaling.

TCustomForm.Visible

  

Indicates if the control is visible on its parent.

TCustomForm.Monitor

  

Contains the Monitor where the form is shown.

TMonitor.PixelsPerInch

  

Contains the Pixels Per Inch (or display density) for the monitor.

TControl.BringToFront

  

Brings the control in front of other sibling controls.

TCustomApplication.Run


Version 3.2 Generated 2024-02-25 Home