#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/progress_bar>
#include <xtd/forms/timer>
 
 
namespace progress_bar_example {
  class form1 : 
public form {
 
  public:
    form1() {
      text("Progress bar example");
      client_size({300, 300});
      
      progress_bar1.parent(*this);
      progress_bar1.location({50, 50});
      progress_bar1.width(200);
      
      progress_bar2.parent(*this);
      progress_bar2.location({50, 80});
      progress_bar2.value(50);
      progress_bar2.width(200);
      
      progress_bar3.parent(*this);
      progress_bar3.location({50, 110});
      progress_bar3.maximum(300);
      progress_bar3.increment(300);
      progress_bar3.width(200);
      
      progress_bar4.parent(*this);
      progress_bar4.location({50, 140});
      progress_bar4.step(1);
      progress_bar4.width(200);
      
      progress_bar5.parent(*this);
      progress_bar5.location({50, 170});
      progress_bar5.maximum(200);
      progress_bar5.minimum(100);
      progress_bar5.style(progress_bar_style::marquee);
      progress_bar5.width(200);
      
      timer1.interval(50_ms);
      timer1.tick += [&] {
        progress_bar4.value(progress_bar4.value() < progress_bar4.maximum() ? progress_bar4.value() + 1 : progress_bar4.minimum());
      };
      timer1.enabled(true);
    }
    
  private:
  };
}
 
auto main() -> int {
  application::run(progress_bar_example::form1 {});
}
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10