xtd 0.2.0
Loading...
Searching...
No Matches
use_wait_cursor.cpp

Shows how to create an use_wait_cursor with xtd::forms::application class.

Windows

macOS

Gnome

#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/forms/use_wait_cursor>
#include <xtd/threading/thread>
using namespace xtd;
using namespace xtd::forms;
using namespace xtd::threading;
class form1 : public form {
public:
form1() {
text("Use wait cursor example");
button1.auto_size(true);
button1.location({10, 10});
button1.parent(*this);
button1.text("Do something...");
button1.click += [] {
for (auto count = 0; count < 500; ++count) {
application::do_events();
thread::sleep(10_ms); // Simulate work...
}
};
}
private:
button button1;
};
auto main() -> int {
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a Windows button control.
Definition button.h:49
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:54
Creates a use wait cursor class.
Definition use_wait_cursor.h:25
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.h:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10