Dbl-Click to load a file when app is already running

E

Elmo Watson

I'm using the GetCommandLineArgs (VB.Net 2005) in my form load event
GetOutsideFile(Environment.GetCommandLineArgs())
so that, when I have files associated with my app, and double click on a
file, they will run the app and load the file in it.

However, when the app is already loaded, double-clicking on a file will not
load it, since the application is already running, and the only reference is
in the frmMain's load subroutine.

What do I need to do inside my app, to make this possible?
 
E

Elmo Watson

I'm associating them through my Installer program - - that's not the
problem - I have that part done.

The part that I'm having problem with is that, once associated -
dobule-clicking one file will open the program and load the file - no
problem
BUT - when double clicking on the file, once the program is already loaded
and in memory, WILL NOT load the newly double-clicked file into the program
 
G

G Himangi

I am not sure but I think Windows attempts to communicate with your open app
instance via DDE when a second file is being opened. You will have to handle
DDE messages send to your main app window.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top