Loading bar- How to built one?

vivienwwp
01-13-2004, 01:40 AM
Hi everyone,

I'd like to have a loading bar, the one that shows you how long the process is taking.. Can anyone give me an idea of how to do that?

Thanks

mikechan8888
01-13-2004, 03:55 AM
Is that related to counting the number of records being processed in the database? If so, use the ProgressBar in VB and study the .Max and .Value property.

Mike

vivienwwp
01-13-2004, 05:45 PM
Hi Mike,

Yes, that's what i'm trying to do. But where do i get the progress bar control??

mikechan8888
01-13-2004, 10:34 PM
In your VB Main Menu, Select Project -> Components -> Check "Microsoft Windows Common Controls 6.0".

You should now see the ProgressBar component in your Toolbox.

Mike

vivienwwp
01-13-2004, 10:45 PM
Hi Mike,

I did get the progress bar already but how do I determine when my process is going to end. This is the code that I used:

pbProgress.Min = 1
pbProgress.Max = 30000000

For iLp = 1 To 20500000
pbProgress.Value = iLp
'Some delay code or operation here
Next iLp

The max value is just some random value that i enter by trial and error hopefully to matches when my process will complete. How do I do this with a timer or any other better methods?

Thanks

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum