Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

[TUT] How to use progress bars in depth [Noob Proof]

How to use progress bars in-depth

So first of all i would like to say that i'm only learning vb so if i do something wrong or something can be done better please tell me.

How to use them [lvl1]
1) Fist of all you will need: 1 'button' - Spoiler (Click to View) and 1 'progressbar' - Spoiler (Click to View) Everything should look something like this - Spoiler (Click to View)

2) Double click 'Button1', then write
PHP Code

<?php 
ProgressBar1
.Increment(10) 
Spoiler (Click to View)

3) click debug - Spoiler (Click to View) or Spoiler (Click to View) or spress 'f5'

4) click 'button1' and the progressbar should go up to 90% then crash to prevent this use this code (made this myself dont know if this is the proper way to do it)Spoiler (Click to View)

How to use them [lvl2]
1) Fist of all you will need: 1 button - Spoiler (Click to View) and 1 progressbar - Spoiler (Click to View) and a 'timer' Spoiler (Click to View). Should look something like this - Spoiler (Click to View)

2) Double click 'tmer1' and add this code
PHP Code

<?php 
If ProgressBar1.Value = 100 Then
    Timer1
.Stop()
    
MessageBox.Show("Done!")
    
'or add what you need done after the progressbar has reached 100%
  Else
    ProgressBar1.Value = ProgressBar1.Value + 10
  End If 
Should look something like this Spoiler (Click to View)

3) Double click 'button1' and add this code -
PHP Code

<?php 
timer1
.start() 
should look something like this all together - Spoiler (Click to View)

4) click debug - Spoiler (Click to View) or Spoiler (Click to View) or spress 'f5'

Thanks for reading, im currently working on part 2. Part 2 will show you how to use labels to tell people what is going on, im just trying to work out how to explain it properly. This took a long time to make, if this helped you please say thanks. If i have made any mistakes please inform me of them. The limit of images is 10 so i had to put links to 5 of them. Ok i decided i will make a video, its the fastest way.

(May 12, 2011 03:55 PM)Alex™ Wrote:  2) Double click 'Button1', then write
PHP Code

<?php 
ProgressBar1
.Value = ProgressBar1.Value + 10 
Spoiler (Click to View)

You should use the .Increment method instead, it's shorter and it's what it was make for.
Thank you,. I needed this!!
(May 12, 2011 03:56 PM)Cody8295 Wrote:  You should use the .Increment method instead, it's shorter and it's what it was make for.

Thanks, here is the new code, ill put it in the post in a sec.
PHP Code

<?php 
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  
If ProgressBar1.Value = 100 Then
    Timer1
.Stop()
    
MessageBox.Show("Done!")
    
'or add what you need done after the progressbar has reached 100%
  Else
    ProgressBar1.Increment(+10)
  End If

    End Sub 


(May 12, 2011 03:57 PM)Tim Joe Wrote:  Thank you,. I needed this!!

NP this is what the tut is made for :)
This isn't in-depth at all -.-'
(May 12, 2011 04:03 PM)Apple Wrote:  This isn't in-depth at all -.-'

hmm, stop hatin, there is going to be a part 2 as i said. This is more time consuming than i thought.
You should make a timer which automatically increments.
(May 12, 2011 04:06 PM)Marketplace Wrote:  You should make a timer which automatically increments.

I have. please read the lvl2
(May 12, 2011 03:58 PM)Alex™ Wrote:  Thanks, here is the new code, ill put it in the post in a sec.
PHP Code

<?php 
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  
If ProgressBar1.Value = 100 Then
    Timer1
.Stop()
    
MessageBox.Show("Done!")
    
'or add what you need done after the progressbar has reached 100%
  Else
    ProgressBar1.Increment(+10)
  End If

    End Sub 

You don't need the "+," just 10.

(May 12, 2011 04:07 PM)Cody8295 Wrote:  You don't need the "+," just 10.

i don't O.o ok lol thanks
(May 12, 2011 04:09 PM)Alex™ Wrote:  i don't O.o ok lol thanks

What do you mean you don't?

Quote: ProgressBar1.Increment(+10)

(May 12, 2011 04:11 PM)Cody8295 Wrote:  What do you mean you don't?

like an a rhetorical question i.e bob says"you need to do 'x' " sid says" I do? ok"
(May 12, 2011 04:13 PM)Alex™ Wrote:  like an a rhetorical question i.e bob says"you need to do 'x' " sid says" I do? ok"

Oh, well, there was no question mark, lol, I thought you meant it literally.
I made a really good progress par tutorial but I reformatted my pc :(
Do people have BB code editors or something? how do people make these really long threads, this one must of took an hour with all the pics n shit.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by MiguelSanchezFeb 20, 2022 07:49 AM 2 128 Feb 20, 2022 07:49 AM
Last Post: Sky
[.NET] by blake.haleApr 8, 2018 10:31 AM 8 636 Apr 8, 2018 10:31 AM
Last Post: adenfr
[.NET] by blake.haleApr 7, 2018 03:45 PM 16 1,327 Apr 7, 2018 03:45 PM
Last Post: darkvas