demonstrates the use of application events.
#define TRACE
#include <xtd/diagnostics/trace>
#include <xtd/forms/application>
#include <xtd/forms/debug_form>
#include <xtd/forms/form>
auto main() -> int {
button1.auto_size(true);
button1.location({10, 10});
button1.text("show dialog");
button1.parent(form1);
button1.click += [] {
};
application::application_exit += [] {
trace::write_line("Application exit");
};
application::enter_thread_modal += [] {
trace::write_line("Enter thread modal");
};
application::idle += [] {
static auto cpt = 0;
trace::write_line(string::format("Idle [{}]...", ++cpt));
};
application::leave_thread_modal += [] {
trace::write_line("Leave thread modal");
};
application::thread_exit += [] {
trace::write_line("Thread exit");
};
application::run(form1);
}
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10