Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Shelling headache

Posted on 1999-01-26
3
Medium Priority
?
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 180 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…

715 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