Results 1 to 3 of 3

Thread: Run only one copy of program

  1. #1
    Guest
    Now if I write an application, e.g. abc.exe, the user could run more then
    one copy of the program when they click it in the explorer many times. So how
    could I do if I want the user can only run only one copy of that program, i.e. if
    the program (abc.exe) already started and the user double click its icon in the
    explorer, then the abc.exe will got focus (not a new process).

    Thank!

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    ' See if there is already and instance.
        If App.PrevInstance Then
     ' Activate the previous instance
            AppActivate App.Title
            
    ' Terminate the new instance
            Unload Me
        End If
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Guest
    it work, thank HeSaidJoe!

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