Advertisement
lineoff

Timmer

May 17th, 2016
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. public partial class Form1 : Form
  2. {
  3. public Form1()
  4. {
  5. InitializeComponent();
  6. }
  7. private void button1_Click(object sender, EventArgs e)
  8. {
  9. timer1.Start();
  10. if (progressBar1.Value < 100)
  11. {
  12. progressBar1.Value += 1;
  13. }
  14. else
  15. {
  16. progressBar1.Value = 0;
  17. }
  18. }
  19. private void button2_Click(object sender, EventArgs e)
  20. {
  21. timer1.Stop();
  22. }
  23. private void button3_Click(object sender, EventArgs e)
  24. {
  25. timer1.Stop();
  26. progressBar1.Value = 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement