Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress Bar Issue

Status
Not open for further replies.

mlager

Programmer
Sep 1, 2006
74
0
0
US
I have an application that executes 5 external commands via the shell function. There are times where a command can take 5 seconds to open and close, and sometimes 5 minutes.

When executing the commands via the shell function, I have specified the wait option with a -1 timeout. I don't want the 5 commands to execute at the same time, or even overlap.

Prior to each shell command executing, I issue the ProgressBar.PerformStep() function to advance the bar. Ultimatly, there would be five steps to fill the entire progress bar.

My issue is that when one of the commands takes more than about 5 seconds, the windows app goes to "Not Responding" and the progress bar then doesn't advance, until after the 5th shell process is complete and the bar steps from nothing to 100% instantly.

Is there something I need to put between the progress bar step and the next shell execution that will allow the shell function to return control back to the app long enough for the progress bar the advance prior to executing the next shell command?

Any advice would be appreciated!
 

Application.DoEvents()


I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Thanks! The Application.DoEvents() worked perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top