I'm not sure that that is the proper way to get this behaviour, although if you're happy it works, nevermind.
The Windows shell uses DDE to communicate with currently running instances of your program when you open a file in Explorer and if you can interpret and respond to these message positively, then it will not open another instance.
If you have a look at the File Type properties for commercial applications (like MS Office), they all have DDE setup so that they can acheive the effect your after. The idea is you can tell the shell to send the file path to your application instance using DDE and you can open it internally. However, I haven't tried doing this in Blitz so I can't give you much more info than that. Maybe someone who actually knows what there doing with the Windows API could help with trying to implement this - I'd be interested in getting this working too.
Edit: Here's an MSDN page on using DDE and a diagram taken from that page showing data flow:
.gif)
I can't make much sense out of it though. :-(
The Windows shell uses DDE to communicate with currently running instances of your program when you open a file in Explorer and if you can interpret and respond to these message positively, then it will not open another instance.
If you have a look at the File Type properties for commercial applications (like MS Office), they all have DDE setup so that they can acheive the effect your after. The idea is you can tell the shell to send the file path to your application instance using DDE and you can open it internally. However, I haven't tried doing this in Blitz so I can't give you much more info than that. Maybe someone who actually knows what there doing with the Windows API could help with trying to implement this - I'd be interested in getting this working too.
Edit: Here's an MSDN page on using DDE and a diagram taken from that page showing data flow:
.gif)
I can't make much sense out of it though. :-(