Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running an external program
Message
De
09/09/2005 08:41:48
 
 
À
08/09/2005 20:34:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01047937
Message ID:
01048033
Vues:
16
The target aplication is a Windows Aplication, and I would like to open it from my VFP9 program without that ugly console.
LPARAMETERS tcFileName
#DEFINE SW_HIDE           0
#DEFINE SW_SHOWNORMAL     1
#DEFINE SW_SHOWMINIMIZED  2
#DEFINE SW_SHOWMAXIMIZED  3 

LOCAL ARRAY laJunk[1]
LOCAL lnRes
**********************************************************
*** Check that the library has been set up and open it if not already done.
**********************************************************
lnRes = ADLLS( laJunk )
IF lnRes = 0 OR  NOT ( ASCAN( laJunk, 'ShellExecute ', 1, -1, 1, 15 ) > 0)
  *** We don't have the function available
    DECLARE INTEGER ShellExecute IN shell32 ;
            INTEGER lnhwnd, STRING lcOperation, ;
            STRING lcFile, STRING lcParameters, ; 
            STRING lcDirectory, INTEGER lnShowCmd
ENDIF
lnRes = ShellExecute( 0, "open", tcFileName, "", "", SW_HIDE )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform