Results 1 to 2 of 2

Thread: Single Instance of EXE

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Atlanta, GA
    Posts
    80

    Question

    How can I ensure that my EXE cannot be executed a second time while a previous instance is currently running?

    Thanks,
    Kevin
    Kevin

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    Use this code on Form_Load of your application:
    Code:
    Private Sub Form_Load()
        If App.PrevInstance Then
            MsgBox "The application is already running. You cannot run more then 1 copy of this application."
            End
        End If
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width