Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to do this?
Message
De
15/11/1999 13:15:33
 
 
À
15/11/1999 01:14:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00291155
Message ID:
00291241
Vues:
20
>Hi,
> I would like to make my application to be launced when certain file extension is opened or activated .. how could I do so?
> Again, how could I make th Windows OS to launch my application once the certain file (*.myapp) when dbclicked?
>

Using the Windopws Explorer Select View/Folder Options. Select the File Types tab. This will display a list of known file types for the system. If you want to modify an existing association, select it and click the Edit button, which will allow you to change verbs defined for the file type, and add new ones.

If you want to create a new file type definition (an extension not then known to Windows, press the New Type button. This will allow you to define the type (file extension, a name for the type, default icon, and one or more verbs, of which one must be the default verb, invoked by double-clicking in Windows Explorer.

The same can be done programmatically; there is a hierarchy of registry keys created under HKEY_CLASSES_ROOT to accomplish the by the Windows Explorer. You can look at this using REGEDIT to explore the keys associated with your file type; if you've associated the extension "foo", then the entry in the registry would be under HKEY_CLASSES_ROOT\.foo

Be aware that this may point to another entry, in which case the additional entry and its sub-trees will be needed as well. You can use the FFC registry class, or one of the down;loadable registry classes from here on UT to make the necessary changes.

No, I do not have source code to give you to do this.
>
>Thank you
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform