Hello,

Here is a simple answer that will avoid using WinAPI and other complex stuff

In the Form.Load function [when app starts] of your VB app, create file text
somewhere [c:\AppIsRunning.txt]
In the Form.UnLoad function [when app terminates] delete the file

In MB code

If FileExists("c:\AppIsRunning.txt")
  Kill "c:\AppIsRunning.txt"    ''''just in case it is still around from a
previous crash
End If
''''''launch VB app #1
DO WHILE while FileExists("c:\AppIsRunning.txt")=True
LOOP
'''''launch VB app #2
DO WHILE FileExists("c:\AppIsRunning.txt")=True
LOOP

Trey Pattillo
[EMAIL PROTECTED]
http://www.wap3.com

------------------------------------------------

To ME or not to ME, that is the question.
For some it will be to Whistle
and indure the thorns and thistle.
For me it is not to ME, but to NT,
The OS for ME !

  ----- Original Message -----
  From: Jos� Luis Armero
  To: MapInfo-L
  Sent: Tuesday, April 24, 2001 07:18
  Subject: MI-L MI:How to detect when a user closes a program from mapbasic


  Hello list,

  If I launch a VB program from within MapBasic, is it possible to determine
  when the user closes the program?
  I need to wait for this program to run and then launch another one.

  Thanks in advance,

  Jos� Luis Armero
  INCLAM, S.A.
  Madrid, Espa�a






  _______________________________________________________________________
  List hosting provided by Directions Magazine | www.directionsmag.com |
  To unsubscribe, send e-mail to [EMAIL PROTECTED] and
  put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to