Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP and DOS programs
Message
 
À
25/11/1998 00:54:50
Man Wai Chang
Hang Hing Metal Manufacturer
Hung Hom, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00160839
Message ID:
00161305
Vues:
24
>>Yes to both questions. However, I wouldn't use RUN to execute the program. >Rather I'd use the ShellExecute() and send it the name of a shortcut to the >program I'd want to execute.
>
>I could not find the sample codes for using shellexe in
>the file library. Would you mind to post some sample
>codes?

Here's the basic syntax and necessary declaration for ShellExecute:
DECLARE INTEGER ShellExecute IN Shell32;
  INTEGER hwnd, STRING @lpOperation,;
  STRING @lpFile, STRING @lpParameters,;
  STRING @lpDirectory, SHORT nShowCmd
* lcfile is the filename
* lcpath is the working directory
* lnshow should be one of the following:
#define SW_HIDE             0
#define SW_NORMAL           1
#define SW_SHOWMINIMIZED    2
#define SW_MAXIMIZE         3
#define SW_SHOWNOACTIVATE   4
#define SW_SHOW             5
#define SW_MINIMIZE         6
#define SW_SHOWMINNOACTIVE  7
#define SW_SHOWNA           8
#define SW_RESTORE          9
#define SW_SHOWDEFAULT      10
lcoperation = 'open' && or print
lcparms = ""
lnresult = ShellExecute(0, @lcoperation, @lcfile, @lcparms, @lcpath, lnshow)
Be sure that the declaration matches what shown above. It's sensitive to both spelling and case.

hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform