Page 2 of 3

Re: How do I make a custom progress bar?

Posted: Sun Jun 06, 2010 4:47 am
by lawrence12
:o still no posts O_O

Re: How do I make a custom progress bar?

Posted: Sun Jun 06, 2010 1:06 pm
by mandai
What's there to post about now?

Re: How do I make a custom progress bar?

Posted: Sun Jun 06, 2010 4:16 pm
by CodenStuff
Hello lawrence12,

I thought mandai gave a very good answer to your question: viewtopic.php?f=32&t=2219#p13892

Unless you need help doing something else?

Re: How do I make a custom progress bar?

Posted: Mon Jun 07, 2010 3:37 pm
by lawrence12
Okay Codie thanks wahooo;

Re: How do I make a custom progress bar?

Posted: Wed Jun 09, 2010 11:18 am
by lawrence12
but where do I put that code in?
The Post you posted included a code in it but no instructions, meaning no details or stuff, so I didn't learn anything :|

Re: How do I make a custom progress bar?

Posted: Wed Jun 09, 2010 11:22 am
by lawrence12
:( And I got a NullReferenceException was unhandled error.
How cool was that?, the post didn't help at all.

Re: How do I make a custom progress bar?

Posted: Wed Jun 09, 2010 12:42 pm
by CodenStuff
Hello,

You need to add a Button control and PictureBox control to your form and then use the code like:

Add under "Public Class Form":
Code: Select all
Dim gfx As Graphics
    Dim percent As Integer = 0
Inside the "Form_Load" event:
Code: Select all
 PictureBox1.BorderStyle = BorderStyle.FixedSingle
        PictureBox1.Image = New Bitmap(PictureBox1.Width, PictureBox1.Height)
        gfx = Graphics.FromImage(PictureBox1.Image)
Inside the "Button_Click" event:
Code: Select all
 percent += 10
        gfx.FillRectangle(Brushes.Black, New RectangleF(0, 0, PictureBox1.Width / 100 * percent, PictureBox1.Height))
        PictureBox1.Refresh()
Ive added it into the project below to demonstrate mandai code.

Download:
CustomProBar.zip

Re: How do I make a custom progress bar?

Posted: Wed Jun 09, 2010 4:46 pm
by mandai
lawrence12 wrote:
but where do I put that code in?
The Post you posted included a code in it but no instructions, meaning no details or stuff, so I didn't learn anything :|
You put the code in your Form1.vb file.

You diddn't ask for detail in your request (in fact you diddn't even explain how it should be custom). If you know what the types and functions are for then it should be easy to understand.

Re: How do I make a custom progress bar?

Posted: Mon Jun 14, 2010 9:57 am
by lawrence12
mandai wrote:
lawrence12 wrote:
but where do I put that code in?
The Post you posted included a code in it but no instructions, meaning no details or stuff, so I didn't learn anything :|
You put the code in your Form1.vb file.

You diddn't ask for detail in your request (in fact you diddn't even explain how it should be custom). If you know what the types and functions are for then it should be easy to understand.
Oh Im sorry but Im not that advanced yet.

Re: How do I make a custom progress bar?

Posted: Mon Jun 14, 2010 9:59 am
by lawrence12
CodenStuff wrote:
Hello,

You need to add a Button control and PictureBox control to your form and then use the code like:

Add under "Public Class Form":
Code: Select all
Dim gfx As Graphics
    Dim percent As Integer = 0
Inside the "Form_Load" event:
Code: Select all
 PictureBox1.BorderStyle = BorderStyle.FixedSingle
        PictureBox1.Image = New Bitmap(PictureBox1.Width, PictureBox1.Height)
        gfx = Graphics.FromImage(PictureBox1.Image)
Inside the "Button_Click" event:
Code: Select all
 percent += 10
        gfx.FillRectangle(Brushes.Black, New RectangleF(0, 0, PictureBox1.Width / 100 * percent, PictureBox1.Height))
        PictureBox1.Refresh()
Ive added it into the project below to demonstrate mandai code.

Download:
CustomProBar.zip
Well I was looking for a stylish one :|