Search code examples
c#sendto

SendTo menu and single instance program


I'm making a program through which I will be able to send files to an FTP server just by right clicking "SendTo". The problem is that every time I click "SendTo" it opens a new exe file and it works as a separate program. I need to make it somehow to send the file with the already open program.

Thank you.


Solution

  • Here is an example application with source code: Single Instance Application, Passing Command Line Arguments.

    The examples uses .Net Remoting to pass the arguments between instances but you can change it to use WCF, sockets or pipes.