tags:

views:

37

answers:

2

I want to open files, which are doubleclicked in Explorer, in the same instance of my .Net application, e.g. in a new tab. How can I do this?

For now each file starts new instance of my application. Many programs can open files in the same instance, for example, Opera and Notepad++, so there is an easy way for sure.

+1  A: 

Might be an easier way to do it but the way I've done it is that if an instance is started with a filename as a parameter then it checks if there are any other instances and if so passes on the filename to that instance and the close itself down.

ho1
A: 

You may take a look at this post which illustrates a technique that could be used to have a single instance WinForms application.

Darin Dimitrov