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:
00878692
Views:
15
George, I think you're missing what he is getting at. If you open Windows Explorer, and right click on a file with a .txt extension (for example), there is a menu item 'Open With' that shows a right arrow indicating a further menu. When you choose this, a menu drops down giving a list of choices of apps to use to open that .txt file. In my case, for instance, it gives me a list containing UltraEdit 32, Visual Foxpro, Notepad, Internet Explorer, and Visual Studio .Net.

What he is trying to figure out is where that list comes from. On other types of files, you get the "Open With..." that opens the browser box to allow the user to choose an app.

I'd have replied to him, but unfortunately, my response would have to have been "Darned if I know.", so I didn't bother.

Alan

>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform