p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 19th, 2005, 03:57 PM
Friend of Wrox
Points: 836, Level: 11
Points: 836, Level: 11 Points: 836, Level: 11 Points: 836, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , USA.
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old December 19th, 2005, 05:07 PM
Friend of Wrox
Points: 1,254, Level: 14
Points: 1,254, Level: 14 Points: 1,254, Level: 14 Points: 1,254, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old December 19th, 2005, 05:22 PM
Friend of Wrox
Points: 836, Level: 11
Points: 836, Level: 11 Points: 836, Level: 11 Points: 836, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , USA.
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old December 19th, 2005, 08:12 PM
Friend of Wrox
Points: 1,254, Level: 14
Points: 1,254, Level: 14 Points: 1,254, Level: 14 Points: 1,254, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Alameda, ca, USA.
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #5 (permalink)  
Old December 27th, 2005, 04:55 PM
Friend of Wrox
Points: 836, Level: 11
Points: 836, Level: 11 Points: 836, Level: 11 Points: 836, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , USA.
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to jmss66
Default

Hi Macro,

I'll play with this code. Thanks again for your help.

Judy

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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



All times are GMT -4. The time now is 09:50 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc