Results 1 to 15 of 15

Thread: [RESOLVED] VS 2012 Express: Check for Instance of App Before Running

Threaded View

  1. #15

    Thread Starter
    Hyperactive Member Vladamir's Avatar
    Join Date
    Feb 2012
    Location
    Miami, FL
    Posts
    486

    Re: [RESOLVED] VS 2012 Express: Check for Instance of App Before Running

    Quote Originally Posted by dday9 View Post
    The SetForegroundWindow should make that instance be un minimized. That's not working for you?
    Yes, I'm sad to report that I tested before I took it to this woman who insists on opening up a multiple instances (and wow is she ever a fox!) Anyway, I compile the new code and then copy the exe file to the distro location for my apps on the server. I create a shortcut which points to this exe file and then launch it. The app comes up and I minimize it, the way she is going to do with it. Then I click on shortcut icon again, just like she is going to do. There is no second instance created but the icon on the task bar remains there. The window for the app does not return to the desktop.

    And to make matters worse...or better... I commented out all the code above and simply checked the Make single instance application...and that did the trick. Actually, it worked with your code in it too but not until I checked Make single instance application. I went back and rechecked this and that is all it takes to keep these users from launching the darn thing 10 to 12 times in each day. I just checked one of the other users in Customer Service and she had it opened 9 times on her task bar. I cautioned them to simply reuse the one they already have running but like I said, that's like talking to the walls. This fix should take care of that issue.

    I wasn't aware that this switch behaved this way. I learned something new again today....so it's been worth it. And many thanks to you and kebo for the advice.
    Last edited by Vladamir; Apr 18th, 2013 at 02:34 PM.

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