>Exactly, him starting an external application, in fact its and other VFP application (.EXE) that is already running on a network. I need the result given by this network application to run my desktop application. I've tried to use the ShellExecute API but I did'nt found any way to make my apps wait until the completion of the network EXE.
-------
Pascal - here's some code that works for me... You'll need to dig into the win32 api for any additional syntax you might want to sling at it:
---
LOCAL nisrunning, lsuccessful
******************
DECLARE INTEGER FindWindow IN win32api INTEGER,STRING
DECLARE INTEGER ShowWindow IN win32api INTEGER,INTEGER
crunstring = "run /N "+alltrim(thisform.cdrive)+"\sns\edicom16\edicom16 -dial -f toronto.ini"
&crunstring
WAIT window TIMEOUT 10 && gives the external app time to instantiate on the desktop
nisrunning = FindWindow(0,'EDICOM16') && you'll need to know the caption of the program you've called - plug it in here.. you might need to use the dependency walker from vs to get it
DO WHILE nisrunning > 0 && if it's still there, have a wait loop and keep checking it
nisrunning = findwindow(0,'EDICOM16')
WAIT ALLTRIM(STR(nisrunning)) window TIMEOUT 2
ENDDO
---------------
hope this helps..
regards [Bill]
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement