Link to home
Start Free TrialLog in
Avatar of BadBigShot
BadBigShot

asked on

How can I get a running application to open a document from Windows Explorer?

Hi,

I configured my app to open JPG files in Windows Explorer.

I'd like my app to have only a single instance in which every JPG files are loaded. I guess I have to make my app check whether there is an instance already running and if there is, communicate in some way the filenames to this already running instance so that it can load the files.

but how do I set this communication between the instances? What's the clever way to do it? Is there an event for this?
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

1) .NET version?

2) How are you opening files with Windows Explorer?  Process.Start?

Bob
If you have .Net 2.0 (Visual Basic 2005) then the Application Model handles this nicely:
http://msdn2.microsoft.com/en-us/library/w3xx6ewx.aspx

Bob...I think he has associated the .jpg extension with his application so that when you double click jpg files they open with his app.
Avatar of BadBigShot
BadBigShot

ASKER

I have VB.NET 2003

ya, sorry, that's what I meant : I simply associated the extension with my app
1) I participate in a lot of questions
2) Their problem space is not easy to recognize
3) If I go off half-cocked, I run the risk of spinning my wheels
4) Now, I try to understand the space better up front, to eliminate waste
5) Sometimes when I take that extra time, someone will understand it better, and come breezing in with an answer.
6)The first time it happened I was quite offended (I felt dissed)--now, I am totally cool, if the question is answered, and I learn something at the same time.

@~IM,
What part of the Application Model are you talking about?

Bob
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, I don't have time to glance at 2005 right now so I'm just gonna give out the points even though I couldn't make it work in 2003.

I'm in deep scheiße after formatting my hard drives. I just seem to have my partitions randomly deleted now and then and I can't figure out why... I'm looking forward to test your solutions as soon as I get my tech prob solved!