|
|
 |
| VB How-To Ask your "How do I do this with VB?" questions in this forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VB How-To section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

December 19th, 2005, 03:57 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: , , USA.
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Progress Bar
Hi Guys,
I wanted to add a progress bar in my project. I don't remember which component I needed to add. I was looking for anything that resembles progress bar or any Active X control but I can't seem to find it. Can someone please help me add a progress bar to my project.
Thanks,
Judy
|

December 19th, 2005, 05:07 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
It's in mscomctl.ocx, that you can include using the Components dialog (Ctrl+T) selecting:
Microsoft Windows Common Control 6.0 (SP3)
or whatever service pack you have.
Marco
BTW I do not like that control at all. I prefer make my own using a simple PictureBox, because I can add much more flexibility.
|

December 19th, 2005, 05:22 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: , , USA.
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Macro,
Thanks. I was able to add it in. I am interested in what you said about creating your own using a picture box. Do you have any samples of code or any site that has this?
Thanks,
Judy
|

December 19th, 2005, 08:12 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I set the BackColor and ForeColor of the PictureBox to something like White and Blue. Then I use the Scale property to set the range of the progress bar (equivalent to the Max property of the scrollbar) like:
picture.scale (0,0)-(maxVal,1)
if the progress bar is horizontal, otherwise
picture.scale (0,0)-(1,maxVal)
And then in the picture Paint event:
Picture.Line (0, 0)-(pValue, 1), , BF
(horizontal) where pValue is the current progress value.
This is the concept. Playing with the paint event, it is possible to get other fancy effects. I wrapped all the code in a nice class, so that I can add more properties as needed.
Marco
|

December 27th, 2005, 04:55 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: , , USA.
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Macro,
I'll play with this code. Thanks again for your help.
Judy
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Progress Bar |
dotnetsathya |
VS.NET 2002/2003 |
0 |
September 26th, 2007 01:33 AM |
| Progress bar |
Poncho |
Pro VB 6 |
1 |
March 23rd, 2006 03:18 PM |
| progress bar |
treasacrowe |
Classic ASP Basics |
11 |
February 11th, 2005 10:47 AM |
| Progress Bar |
BSkelding |
ASP.NET 1.0 and 1.1 Basics |
3 |
May 4th, 2004 05:12 AM |
| Progress Bar Help |
jacob_d_99 |
Javascript How-To |
1 |
November 20th, 2003 11:18 PM |
|
 |