Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Runnig External apps from within VFP
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00206445
Message ID:
00208281
Vues:
20
>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
Fil
Voir

Click here to load this message in the networking platform