|
-
Apr 21st, 2003, 05:03 PM
#1
Thread Starter
Fanatic Member
ProgressBar [RESOLVED]
Know how display and show a ProgressBar working, but want it to show while other tasks are being done.
Specifically, am reading data from a Notepad file and writing parsed info to an Excel spreadsheet. How do I show the ProgressBar functioning while the reading and writing is going on?
Last edited by doofusboy; Apr 22nd, 2003 at 09:17 AM.
Do canibals not eat clowns because they taste funny? 
-
Apr 21st, 2003, 05:06 PM
#2
-= B u g S l a y e r =-
depends a bit on how your code is built up....
VB Code:
'start loop
'read from file
'update progress
'doevents
'write to file
'update progress
'doevents
'end loop
something along those lines maybe
-
Apr 21st, 2003, 05:21 PM
#3
Thread Starter
Fanatic Member
Aha.......so you're saying it depends on where my
ProgressBar1.Value = i
DoEvents
statements are made in my code?
And do I need to include a "Do Events" every time I update the ProgressBar1.Value?
Do canibals not eat clowns because they taste funny? 
-
Apr 21st, 2003, 05:24 PM
#4
-= B u g S l a y e r =-
you have to "feel your way" when it comes to how often you want to do the doevents
in order for the pb to view its updates, u will probably need it for each loop...
-
Apr 21st, 2003, 05:25 PM
#5
-= B u g S l a y e r =-
the doevents will slow down your code though
-
Apr 21st, 2003, 07:36 PM
#6
You can probably just use a ProgressBar1.Refresh call instead of calling DoEvents. But the prograssbar must somehow get processor time to redraw itself.
-
Apr 22nd, 2003, 09:17 AM
#7
Thread Starter
Fanatic Member
Issue resolved by updating ProgressBar1.Value during other processing .....and ProgressBar1.Refresh was just the ticket! ....works like a charm
Thanks to all who responded.
Do canibals not eat clowns because they taste funny? 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|