A
Anthony
Hi, all --
I've seen several very good articles which discuss how to make a single instance Windows Form and even how to give an existing instance of the application the focus. This question takes the issue to the next level. Here's the requirement, for which I can't find any samples or instructions online:
One instance of MyApp.exe is already running. I minimize the application and double click on a file on the Desktop whose file type, .my, is associated with MyApp.exe. Then not only does MyApp get maximized but it ALSO loads the contents of the clicked-on file. The second part of that sentence is missing in all of the samples I've seen so far.
For simplicity sake, imagine that MyApp.exe is an MDI-based application and that each MDI child form hosts a single RTF control. So, each file contains basic RTF text information and its file type is .my.
Any advice or links to existing articles would be greatly appreciated!
Cheers,
Anthony
P.S. --
Thanks to several folks who offer good info on basic single-instance application coding:
- iDesign.net
- Pedro Silva on DevHood
- Bob Powell
I've seen several very good articles which discuss how to make a single instance Windows Form and even how to give an existing instance of the application the focus. This question takes the issue to the next level. Here's the requirement, for which I can't find any samples or instructions online:
One instance of MyApp.exe is already running. I minimize the application and double click on a file on the Desktop whose file type, .my, is associated with MyApp.exe. Then not only does MyApp get maximized but it ALSO loads the contents of the clicked-on file. The second part of that sentence is missing in all of the samples I've seen so far.
For simplicity sake, imagine that MyApp.exe is an MDI-based application and that each MDI child form hosts a single RTF control. So, each file contains basic RTF text information and its file type is .my.
Any advice or links to existing articles would be greatly appreciated!
Cheers,
Anthony
P.S. --
Thanks to several folks who offer good info on basic single-instance application coding:
- iDesign.net
- Pedro Silva on DevHood
- Bob Powell