|
|
Home » Developing U++ » U++ Developers corner » Open file in already opened app instead of launching a second copy
Open file in already opened app instead of launching a second copy [message #25970] |
Mon, 22 March 2010 17:39  |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
I wonder how that can be done...
I have a multi-document application; when it's already running I'd like, if double clicking on another document, to have the app loading the second document instead of launching a new app instance.
On Linux I did (some time ago) with my Bazaar Signals package, to tell opened app instance to load the new file before exiting.
On Windows I've no hints about....
Ciao
Max
|
|
|
|
|
Re: Open file in already opened app instead of launching a second copy [message #25978 is a reply to message #25973] |
Mon, 22 March 2010 23:25   |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
Thank you, Koldo 
But now the problem is that second application should "send" to first one it's command line, so if I doubleclick a file it'll open on the first running instance.
Example, filea a.myapp and b.myapp
I doubleclick on a.myapp, the application opens and loads a.myapp file
then I doubleclick on b.myapp, the app start, discovers that another instance is running, "sends" its command line to the running instance and leave, so running instance can open the second file.
I can do on Linux, but I'd like a portable way....
Ciao
Max
|
|
|
Re: Open file in already opened app instead of launching a second copy [message #25989 is a reply to message #25978] |
Tue, 23 March 2010 21:58   |
 |
koldo
Messages: 3435 Registered: August 2008
|
Senior Veteran |
|
|
mdelfede wrote on Mon, 22 March 2010 23:25 | Thank you, Koldo 
But now the problem is that second application should "send" to first one it's command line, so if I doubleclick a file it'll open on the first running instance.
Example, filea a.myapp and b.myapp
I doubleclick on a.myapp, the application opens and loads a.myapp file
then I doubleclick on b.myapp, the app start, discovers that another instance is running, "sends" its command line to the running instance and leave, so running instance can open the second file.
I can do on Linux, but I'd like a portable way....
Ciao
Max
|
Well, at least you can know which is the application you have to communicate with
Best regards
Iñaki
|
|
|
|
|
|
Goto Forum:
Current Time: Sun May 11 09:05:18 CEST 2025
Total time taken to generate the page: 0.00919 seconds
|
|
|