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

◆ run() [1/3]

static void xtd::forms::application::run ( )
static

Begins running a standard application message loop on the current thread, without a form.

Remarks
In a Win32-based or Windows Forms application, a message loop is a routine in code that processes user events, such as mouse clicks and keyboard strokes. Every running Windows-based application requires an active message loop, called the main message loop. When the main message loop is closed, the application exits. In Windows Forms, this loop is closed when the exit method is called, or when the exit_thread method is called on the thread that is running the main message loop.
Most Windows Forms developers will not need to use this version of the method. You should use the run(const form&) overload to start an application with a main form, so that the application terminates when the main form is closed. For all other situations, use the run(application_context&) overload, which supports supplying an application_context object for better control over the lifetime of the application.
Examples
The following code example demonstrates the use of application run method.
#include <xtd/forms/application>
using namespace xtd::forms;
auto main() -> int {
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
Examples
application.cpp, application_add_message_filter.cpp, application_use_wait_cursor.cpp, busy_box.cpp, busy_dialog.cpp, button2.cpp, button3.cpp, button4.cpp, control_with_name_operator.cpp, emplace.cpp, form2.cpp, hello_world_cmake.cpp, horizontal_layout_panel.cpp, process_form.cpp, screen_informations.cpp, trace_message_box.cpp, tutorial_application_icon.cpp, tutorial_button.cpp, tutorial_communicate.cpp, tutorial_simple_application.cpp, use_wait_cursor.cpp, and vertical_layout_panel.cpp.