The following code example demonstrate the use of busy_dialog dialog.
#include <thread>
#include <xtd/xtd>
class form1 :
public form {
public:
form1() {
text("Busy dialog example");
button1.auto_size(true);
button1.location({10, 10});
button1.parent(*this);
button1.text("Do something...");
button1.click += [&] {
dialog.
icon(xtd::drawing::system_icons::exclamation({64, 64}));
dialog.
text(
"Application busy");
dialog.
description(
"Please wait while do something...");
for (auto count = 0; count < 500; ++count) {
application::do_events();
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
};
}
private:
};
int main() {
}
static const xtd::drawing::color white
Gets a system-defined color that has an ARGB value of 0xFFFFFFFF. This field is constant.
Definition color.h:459
static const xtd::drawing::color red
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant.
Definition color.h:390