Solved

Shelling headache

Posted on 1999-01-26
3
166 Views
Last Modified: 2010-05-03
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!
0
Comment
Question by:NickHeitz
  • 2
3 Comments
 

Author Comment

by:NickHeitz
ID: 1470784
Oh yes, I forgot...shouldn't DoEvents help?  It never seems to aid me in releasing the processor.
0
 
LVL 1

Accepted Solution

by:
james_bligh earned 60 total points
ID: 1470785
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
 

Author Comment

by:NickHeitz
ID: 1470786
I actually ended up using an ActiveX control instead.  Thanks anyway.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question