Error!
Success!

Single-Instance C# Application - for .NET 2.0

0
kicks

Single-Instance C# Application - for .NET 2.0  (Unpublished)

A single-instance application is one that allows the user to open only one instance at a time. Strictly speaking, a second instance is started, but it detects the presence of the first instance, and shuts itself down. Visual Studio 2005 makes single-instance applications very easy. In VB, one simply checks a box on the project settings dialog, then handles the appropriate events. The code that accomplishes this is in the Microsoft.VisualBasic namespace, but it can be used in a C# application. This article will show how to do this, and show how to transfer command-line arguments from the second instance to the original one.


Kicked By:
Drop Kicked By: