Results 1 to 4 of 4

Thread: App.Previnstance

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 1999
    Location
    Littlehampton, W Sussex GB
    Posts
    203
    I am using App.previnstance to tell whether the user has already got this application open and if so am not letting them open it twice.
    Sometimes, however, it seems as though this is telling me it is already open when it isn't, and I have to reboot the machine to reset it. Any ideas?

  2. #2
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Hit Ctrl-Alt-Del and find out if the app really isn't open. Maybe the app is open, but not visible. Could be a coding error in the closing method. This could be a form that was hidden and not unloaded, or a property of a form was accessed, and loaded that form, or a doevents was used in an unload event.

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    You should Unload the form and not force it to close with End or Ctrl Alt Del as it may still remain as active
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    I believe if you are checking for the PrevInstance in the Load of the main form, you would have to use "End" instead of "Unload Me" or else the program will get stuck in memory. All other cases Unload seems to be a better choice.

    Josh

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