Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Code an open with option like win explorer
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00878216
Message ID:
00878685
Views:
17
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform