xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
use_wait_cursor.cpp

The following code example demonstrate the use of use_wait_cursor class.

Windows

macOS

Gnome

#include <thread>
#include <xtd/xtd>
using namespace std::chrono;
using namespace std::this_thread;
using namespace xtd::forms;
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 += [] {
use_wait_cursor wait;
for (auto count = 0; count < 500; ++count) {
application::do_events();
sleep_for(milliseconds(10)); // Simulate work...
}
};
}
private:
};
int main() {
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
@ button1
The first button on the message box is the default button.
@ button
The appearance of a button.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13