Click here to Skip to main content
Licence CPOL
First Posted 18 Jan 2008
Views 10,746
Downloads 89
Bookmarked 22 times

Single Instance Application A Simple Way!

By | 18 Jan 2008 | Article
Making Single Instance Application a Simple Way!!

Introduction

This is a Simple method to make a Application Singleton.

Background

I had seen some Examples on Codeproject but those were a little complex this is the simple method.

Using the code

It is very simple to understand the programming i have done in this example.

	
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Process.GetProcessesByName(Process.GetCurrentProcess.ProcessName).Length() > 1 Then
            MsgBox("This is a Single instance Applicaton " & vbNewLine & "* Another Instance is Already Running", MsgBoxStyle.OKOnly, "Single Instance Application")
            End
        End If
    End Sub

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

skullz_softwares

Web Developer

India India

Member

Hello My name is Hefin Dsouza I am from Mumbai(India) I am 18yrs old I am basicly into programming from the last 2yrs i have already made live projects for many small scale industries and presently i am a Free Lancer for Web applications and Windows Applications.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralThanks PinmemberCatalin Radoi5:25 14 Feb '08  
Generalgreat first effort Pinmembertgueth3:28 22 Jan '08  
GeneralHmm very right. PinmemberM.K.A. Monster3:09 19 Jan '08  

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

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

Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 19 Jan 2008
Article Copyright 2008 by skullz_softwares
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid