Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to mimic Windows Explorer OLEs?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00273937
Message ID:
00273955
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform