Click here to Skip to main content
15,860,859 members
Articles / Programming Languages / C#
Article

Single instance app in C#

Rate me:
Please Sign up or sign in to vote.
3.35/5 (14 votes)
3 Jan 2004 34.3K   1.4K   15   1
Sample for demonstrating interprocess communication using same application.

Introduction

This application ensures that only a single instance of an application exists. If any attempt is made to launch the application a second time, the command line parameters are sent to the already running instance and the second instance is terminated.

This application is the C# equivalent of an already posted article demonstrating the single instance behavior of an application.

This application takes in a command line argument and displays it in the edit box of the form. When this application is launched for the second time, it simply updates the edit box of the already running application instead of creating a new instance.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.