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

.NET 

ProgressBar [ Tutorial For Noobs ]

Today i'll be showing you the progressbar Function.

Requires

-Timer
-Your Form.
-Button ( Optional )

We'll Start By

Adding a Button though you don't need a button you could also use Form_Load
But in this case i'll be using a button.

Add a button to your form Rename it do whatever you want with it.

- imgur.com/J7ofPEH

Then we'll add a Progress Bar and a timer.

ProgressBar

: imgur. com/dEVOdTV,SRfRvJB
: imgur. com/dEVOdTV,SRfRvJB#1

Timer

- imgur. com/FBzUMSL
- imgur.com/1PkCagu

Now on the Button Code

Quote: Timer1.Start()

Starts the timer.

Now we'll do the timers code.

Quote: ProgressBar1.Maximum = 100
ProgressBar1.Minimum = 0
ProgressBar1.Increment (5)


Note you can also change the Increment Its just the amount that loads on the progressbar
And you can also add like
Quote: If ProgressBar1.Value = 100 Then
MsgBox ("ProgressBar Has Reach 100. ")


And their we have it. 🤝
(Dec 9, 2014 10:03 AM)Swagalistic Meow Wrote:  Now we'll do the timers code.
Code
ProgressBar1.Maximum = 100
ProgressBar1.Minimum = 0
ProgressBar1.Increment (5)

It makes no sense to redeclare the minmax progress bar values each clock cycle. Actually you don't even need to do it programmatically there's a perfectly good properties group for you to use.

Code
If ProgressBar1.Value = 100 Then
MsgBox ("ProgressBar Has Reach 100. ")

Did you learn nothing from your hello world tutorial?
This would probably end up in an error. Stop the timer before calling the messagebox. (Timer1.Stop())

I can just imagine: "ProgressBar1.Value exceeded ProgressBar1.Maximumvalue."
Whatever, stop the timer.
(Dec 10, 2014 04:39 AM)Teruz14 Wrote:  Ey cunt stop being such a kid didn't you read the rules " Act 16 and older " Stop trashing over people's posts kiddie.

Maybe the OP should learn how to code properly instead of creating tutorials...
(Dec 10, 2014 04:56 AM)Earn Wrote:  Maybe the OP should learn how to code properly instead of creating tutorials...
I don't see anything with this guys tutorial his codes work, And he's new cut him some slack.
(Dec 10, 2014 07:15 AM)Teruz14 Wrote:  I don't see anything with this guys tutorial his codes work, And he's new cut him some slack.

He sets the min and max for no reason.

Also the progressbar will fill up and then cause an error and crash the application.

Stop defending somebody that has no idea what he is doing when you yourself don't have any idea what you are doing.
[Image: vjPWhyy.gif]
(Dec 10, 2014 04:39 AM)Teruz14 Wrote:  Ey cunt stop being such a kid didn't you read the rules " Act 16 and older " Stop trashing over people's posts kiddie.

I don't have a go at people without strong reason, ask anyone I always keep my cool but OP here is simply stupid.
Why declare the minimum and maximum each time?
Why declare the minimum at all?
This has to be the worst code I have ever seen. And dont you think there already is a tutorial for this? And do you actually think a tutorial is needed? Please learn to program and post some more useful tutorials.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by elmagekOct 24, 2021 02:50 PM 7 293 Oct 24, 2021 02:50 PM
Last Post: #Kat
[.NET] by DeStilleGastJul 4, 2016 03:09 AM 3 428 Jul 4, 2016 03:09 AM
Last Post: DeStilleGast
[C#] by AspectModdingMar 28, 2016 12:43 PM 4 238 Mar 28, 2016 12:43 PM
Last Post: th3s3cr3t0n3