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

submitted by RobChappelRobChappel(2720) 6 years, 3 months ago

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.

add a comment |category: |Views: 55

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story