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?
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?
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.
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.
ASKER
I have VB.NET 2003
ya, sorry, that's what I meant : I simply associated the extension with my app
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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!
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!
2) How are you opening files with Windows Explorer? Process.Start?
Bob