This feature can be done using the mutex MUTEX type. See the following code:
[Stathread]
Public static void main (string [] args)
{
// Declare the mutex.
Mutex Mutex = New Mutex (False, "ThissHolDonlyRunon");
// Judgment is in use of the mutex.
Bool Running =! Mutex.waitone (0, False);
IF (! running)
Application.run (New Formlogin ());
Else
MessageBox.show ("Application is already started!");
}