Solved

Shelling headache

Posted on 1999-01-26
3
167 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 Compile Compatibility Issue 4 121
using Access 8 83
Crystal reports - Formula Field code need assistance with code 17 90
MS Access 03, TransferText, decimal places 8 85
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

685 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