J
John Smith
NO MYTHS: ProgressBar
What is a progress bar?
A progress bar is a fixed background and a sizable foreground.
Can I design my own progress bar?
Of course, maybe it is the easiest control.
How to design MyProgressBar?
You can use one or two basic controls to design YourProgressBar.
Tell me how to use one control only because I want to do it fast.
Sorry, using only one is more difficult, but I tell you how:
1. Use a PictureBox (any other that supports graphics will fit).
2. Add the Property Percent
3. In the Property Set block Invalidate then PictureBox
4. In the Paint event draw what ever you like using the PercentValue
I don't like the Paint event, it's too hard for me.
OK, OK. Use 2 controls
1. Use 2 PictureBoxes with the SizeMode = AutoSize
2. Make one the child and the other the parent.
3. Set the PictureBoxes Image property to your preferred pictures
4. Add the Property Percent
5. In the Property Set block resize the child PictureBox
Oh, just that? Thank's, I'm going to try it now.
.........
Hiiiii, are you there?
Yes
Sorry, I am so dumb. My math is not good enough.
OK.
For a horizontal MyProgressBar:
ChildPictureBox.Width = ParentPictureBox.Width * PercentValue
Don't forget to align the PictureBoxes lefts.
OK
..........
Hiiiii, are you there?
Yes
It's working
Now I want to add a property to select Vertical or Horizontal position
Hmmm, You can do it alone, I need to have my lunch now.
What is a progress bar?
A progress bar is a fixed background and a sizable foreground.
Can I design my own progress bar?
Of course, maybe it is the easiest control.
How to design MyProgressBar?
You can use one or two basic controls to design YourProgressBar.
Tell me how to use one control only because I want to do it fast.
Sorry, using only one is more difficult, but I tell you how:
1. Use a PictureBox (any other that supports graphics will fit).
2. Add the Property Percent
3. In the Property Set block Invalidate then PictureBox
4. In the Paint event draw what ever you like using the PercentValue
I don't like the Paint event, it's too hard for me.
OK, OK. Use 2 controls
1. Use 2 PictureBoxes with the SizeMode = AutoSize
2. Make one the child and the other the parent.
3. Set the PictureBoxes Image property to your preferred pictures
4. Add the Property Percent
5. In the Property Set block resize the child PictureBox
Oh, just that? Thank's, I'm going to try it now.
.........
Hiiiii, are you there?
Yes
Sorry, I am so dumb. My math is not good enough.
OK.
For a horizontal MyProgressBar:
ChildPictureBox.Width = ParentPictureBox.Width * PercentValue
Don't forget to align the PictureBoxes lefts.
OK
..........
Hiiiii, are you there?
Yes
It's working
Now I want to add a property to select Vertical or Horizontal position
Hmmm, You can do it alone, I need to have my lunch now.