Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieving Windows File Associations via VFP
Message
 
À
02/06/2003 10:39:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00795191
Message ID:
00795232
Vues:
47
>George,
>
>I'm not crystal clear on the content of your reply on this thread. Are you saying that Windows Script host is the app that needs to load file returned from GETFILE(), or that this application will get the File Associattion? What is the value of lcFile?
>
>Fred Z

No. What I'm saying is that the Shell object's Run method will resolve it for you. For example, if you used
lcfile = GETFILE('doc')
to return an instance of a Word file from the My Documents folder, then
lcfile = CHR(34) + lcfile + CHR(34) && Quotes add because it's an LFN
oShell.Run(lcfile, 5, .T.)
Will launch Word and it will open the file. The Window will be "Normal" and VFP will wait until Word terminates.

The extra quotes are required because of the spaces in a long file name. If it's not an LFN, then they're not needed.
George

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

Click here to load this message in the networking platform