Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How open a file with my application by double clicking o
Message
De
11/09/2002 08:30:22
 
 
À
11/09/2002 03:16:16
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00699032
Message ID:
00699262
Vues:
19
>Robert,
>
>You also have to create different actions for the application to perform on a file. If you just need to open it, create an action called "Open" and have the value of the action set to something like "C:\Program Files\MyAppFolder\MyApp.EXE %1". For instance, notepad has the "open" action set to "C:\WINNT\system32\NOTEPAD.EXE %1" (at least on my machine). You can view these settings in "Advanced" dialog in Tools/Options/Folder Settings/File Types in explorer.
>

The right way to do this is to create a correct set of registry keys in HKEY_CLASSES_ROOT for the file extension and the application, and create Shell actions for the application under that key that trigger various command lines. This is effectively what you're going in the Explorer dialog; this can be done programmatically. A little sniffing around in the HKEY_CLASSES_ROOT hive of the registry would probably be instructive.

>Hope this helps
>
>>Hello,
>>I have an application that can open different files with different extensions.
>>Examples: .rte .ext .pra .prd .inp etc.…
>>Usually I open a file depending on its extension. I want that the user could open his own files by double clicking on each of them, alike MS Word file or txt file.
>>In my windows OS I assigned the extension .rte and .ext to my application. So when I click on one of these files, my application opens but not the file. What I have to do to open the file as well? Please Help.
>>Regards
>>Robert
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