CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: TheGreatCthulhu

Search: Search took 0.10 seconds.

  1. Re: Single instance app works - still feels a bit like a hack though...

    UPDATE: OK, I was right to write "for now", as the "working" exe occasionally doesn't work, but most of the time it does. Again, for now... I don't get it. If the conditions are somehow altered, it's...
  2. Re: Single instance app works - still feels a bit like a hack though...

    Eri523, I'm going attach the exe file that works (at least on my machine, for now), so that you can test it on yours. Please post the results here. Note that I haven't altered a single line of code,...
  3. Re: Single instance app works - still feels a bit like a hack though...

    Update: OK, now I deleted the entire folder and extracted your rar file again, recompiled, and it doesn't work again.
    This is sooooo The X Files.
    EDIT: I don't know what I did, I cannot reproduce...
  4. Re: Single instance app works - still feels a bit like a hack though...

    Update:
    OMG! Turn's out it's NOT a Windows XP issue - it behaves the same on Windows 7! Except when run from Visual Studio...

    The way I originally tested it is: I use a somewhat customized UI,...
  5. Re: Single instance app works - still feels a bit like a hack though...

    Have you tried SetForegroundWindow?

    Oh, and:


    Sorry, it sounded (... it read) as if I was addressing you - I obviously know you don't need to be reminded of such things; but as there may be...
  6. Re: Single instance app works - still feels a bit like a hack though...

    That's strange... Your sample project works fine on Windows 7 (with both approaches). Must be a Windows XP thing. Investigation into the unknown is called for...
  7. Re: Single instance app works - still feels a bit like a hack though...

    You could override WndProc (inherited from Form) and make it process the WM_BRINGUP message,
    and than do something like this:

    if (WindowState == FormWindowState.Minimized)
    WindowState =...
Results 1 to 7 of 7





Click Here to Expand Forum to Full Width

Featured