xtd 0.2.0
Loading...
Searching...
No Matches

◆ run() [3/3]

static void xtd::forms::application::run ( const form main_form)
static

Begins running a standard application message loop on the current thread, and makes the specified form visible.

Parameters
main_formA form that represents the form to make visible.
Remarks
Typically, the main function of an application calls this method and passes to it the main window of the application.
This method adds an event handler to the main_form parameter for the closed event. The event handler calls xtd::forms::application::exit_thread to clean up the application.
Examples
The following code example demonstrates the use of application run method.
#include <xtd/forms/application>
#include <xtd/forms/form>
auto main() -> int {
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54