Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How open a file with my application by double clicking o
Message
From
14/09/2002 10:56:07
 
 
To
13/09/2002 10:22:44
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00699032
Message ID:
00700511
Views:
12
>Hello,
>Thanks for your comments I appreciate it very much. Somebody have provided me with the code to associate an extension in the registry.
> Now I have some additional questions
>1) How can I open multi files with the same instance of my application, instead of opening one instance for every opened file?

Your best bet is to use a DDE server approach; it's a complex subject, but basically you lauch and app and see if a DDE conversation can be started to handle the file, if so, there's a DDE server, and you establish a DDE session to start the processing; if not, there's no DDE server, and you then start one.

>2) If I put the code of association extensions in the main sub, so this code will execute every time the application runs, then how can I do it to run it only one time? You said that usually the association happens at the set up of the application, how can I do it?

That'd be a matter of writing code to set up the associations during intialization, and then checking for that association during application startup; if it is not found and the current user has sufficient privileges to establish the necessary registry keys and register the server app, you run the install app code.

>3) If an extension has been assigned before, so after executing the code of associate extensions, this extension remains unchangeable. How can I do to force it?

Simply overwrite the registry keys involved; the default behavior for registration is last man standing wins; ie, if two applications both claim the same ProgID hive, the last one to write it will prevail, unless the last one does not have the necessary rights to modify the registry or side-by-side version is supported by the OS.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform