Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Code an open with option like win explorer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00878216
Message ID:
00878685
Vues:
18
>Hi George,
>
>It might be an option to use the "Run With" dialog. But what I would really like is to build up the menu myself so I need to know the which apps can open the file.

Hi Tim,

You could use the FindExecutable function in Shell32 like this
DECLARE INTEGER FindExecutable IN Shell32;
  STRING @lpFileName, STRING @lpDirectory, STRING @lpresult
lcfile = GETFILE('Prg')
lcpath = JUSTPATH(lcfile)
lcfile = JUSTFNAME(lcfile)
lcresult = SPACE(260)
* Will return 32 or greater if sucessful
? FindExecutable(@lcfile, @lcpath, @lcresult)
? LEFT(lcresult, AT(CHR(0), lcresult) - 1)
>>Look at my Run/Run With program in the download section. It will allow you to start an application and, if the file isn't associated with a given program, the Run With...dialog will appear.
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