Results 1 to 3 of 3

Thread: Checking if program is already open

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    11
    I have found another problem in a small app I have written. I need to check if an instance of the program is already open before it opens a second copy. If it is already open, I want to stop the second copy from loading. Does anybody know the procedure for detecting a loaded version of the program?

    Cheers,
    Russ

  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
    Addicted Member S@NSIS's Avatar
    Join Date
    Aug 2000
    Location
    Stoke-On-Trent, England
    Posts
    243
    Hi,
    (working with Russ on this one!).
    The app's previous instance is hidden. We have got it now so that it doesn't load up a second version (thanks, HeSaidJoe), but how do we get the original one to show again when a user tries to load a second one. AppActivate just doesn't seem to be working!

    Any ideas

    Cheers

    Shaun
    Web/Application Developer
    VB6 Ent (SP5), Win 2000,SQL Server 2000

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