Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to mimic Windows Explorer OLEs?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00273937
Message ID:
00273955
Views:
14
>I would the user to click from a list view (or similar control), and if (for example) the file clicked is an Excel spreadsheet; it would be neat if I could make it open "automatically" like it does in when clicked through Windows or NT explorer.

Well, you can you something like GETFILE(), which will show the icons, then use a call to ShellExecute() to launch the application. There's a sample in the VFP 6.0 FFC in the environ.vcx. There's also my Run/Run With program that's available for download here in the file section (Win32 and other APIs). Either can show you how to launch the file in the associated application.

>My question is: Does Windows/VFP offer a method that will associate a file type like XLS with the proper OLE handles and icons, or do I need to evaluate each file type in the list and write my own ole associations?
>
AFAIK, there's no control (list the ListView) that will do this. Of course, you could just launch the explorer.exe and let them use that as easily.
>Terry
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform