Shelling headache

I have a program that checks its own Version number, then calls another VB executable that is responsible for getting the newest version via FTP and copying it to the right directory.  As soon as the second application is shelled, I issue the "End" command in the first application, but unfortunately, I can't seem to force it to end soon enough for the shelled executable to work properly with FileCopy's and Kill's, and nothing I do in the second executable, short of displaying a mesage box, releases the processor sufficiently so that first program can shut down.  What can I do?  Do I need to release the system somehow, or change priority settings?  Help!
NickHeitzAsked:
Who is Participating?
 
james_blighConnect With a Mentor Commented:
Hi Nick,

DoEvents should work but you may need to call it more than once, ie. keep calling it until the previous application has closed down.  Of course with this solution you need to devise a method for detecting the first application which is a problem all by itself.

The other option is to use the Win32 API call 'sleep' which causes a process to sleep for a certain number of milliseconds.  Just like DoEvents except you can specify a specific delay time.

Hope this helps,

James


0
 
NickHeitzAuthor Commented:
Oh yes, I forgot...shouldn't DoEvents help?  It never seems to aid me in releasing the processor.
0
 
NickHeitzAuthor Commented:
I actually ended up using an ActiveX control instead.  Thanks anyway.
0
All Courses

From novice to tech pro — start learning today.