A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

How to make a Progress bar! [TuT]

1k views · started by M0NST3R ·
#1
How to make a Progress bar! [TuT]
Ok well this is just a request i got randomly but who cares.

What you will need:
1 progress bar
1 timer
2 buttons
-----------------------------------
Time to code!
-------------
Code button 2 (or the stop button) as:
Timer1.stop

--------------------------------------
Code the start button as:
Timer1.start

---------------------------------------
Then code the Timer as:
Progressbar1.increment(+1)
If progressbar1.value=100 Then
Messagebox.show ("finsished")
Me.close

----------------------------------------
#2
Good job! However your proposition will cause the messagebox to show up multiple times (each time the timer ticks before you click 'ok'), which may be noisy. Here is what I suggest:


ProgressBar1.Increment(+1)
If ProgressBar1.Value = 100 Then
Timer1.Stop()
MessageBox.Show("Finished!")
End If


This will also prevent your form from being closed down.
#3
Good job! However your proposition will cause the messagebox to show up multiple times (each time the timer ticks before you click 'ok'), which may be noisy. Here is what I suggest:

        ProgressBar1.Increment(+1)
If ProgressBar1.Value = 100 Then
Timer1.Stop()
MessageBox.Show("Finished!")
End If


This will also prevent your form from being closed down.


OH ok. thanks for the help.
#4
Cool, but next time put the language your making the progress bar in in the title of your thread! xD Nice tutorial though