Page 1 of 1

An older instance of this script is already running popup

Posted: Sun Aug 19, 2012 12:35 am
by mikethedj4
How can I incorporate this into my application?
appalreadyrunningpopup.png

Re: An older instance of this script is already running popup

Posted: Sun Aug 19, 2012 3:40 am
by CodenStuff
If you mean you only want 1 instance of your software to run then you need to check the 'Make single instance application' box in project properties and to have an alert when the user tries to run it more than once you need to add a next instance handler to the ApplicationEvents.vb file within the MyApplication class like this:
Code: Select all
        Private Sub SNI(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupNextInstanceEventArgs) Handles Me.StartupNextInstance
            MsgBox("Already Running")
        End Sub

Re: An older instance of this script is already running popup

Posted: Mon Aug 20, 2012 11:05 pm
by mikethedj4
ok thanks again bro, this will definitely come in handy.