Overview | Methods | This Package | All Packages

OverviewMethodsThis PackageAll Packages

Application.run

Begins running a standard application and its associated message loop in the current thread.

Syntax

public static void run()

public static void run( Form mainForm )

Parameters

mainForm

A Form object that represents the main form of the application being run. If this is null, it is the same as calling the run method without any specified parameters.

Remarks

If a Form object is specified in a call to run, the form's visible property is set to true, and a closing event handler is added to the form. The closing event handler calls the exit method for you, which cleans up the application. If you do not pass a form to this call, the message loop runs until the exit or exitThread method is called. Typically, the main function of an application calls the run method with the main window of the application specified as the parameter.