Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Bug in ShowWindow in Windows 7

Bug in ShowWindow in Windows 7

Scheduled Pinned Locked Moved C#
csharpvisual-studiowinformsdebugginghelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Axonn Echysttas
    wrote on last edited by
    #1

    Hello everybody. For *two weeks*, each day since I installed Windows 7, I have been struggling to get something to work. Something which worked perfectly ok in XP. It's driving me mad, poisoning my life, ruining my days. Why such a simple task works SO CHAOTICALLY!? I think I discovered a bug in Windows 7, specifically in the way the ShowWindow function works in the standard theme (Aero). To demonstrate this, I uploaded 2 C# WinForms applications and their source code. http://www.axonnsd.org/W/P007/BugsDemo.rar HideableApplication represents an application which you can hide in the SysTray when you close it. Double clicking the SysTray icon reveals it and right clicking will reveal the "Exit" option. HideableApplicationRevealer attempts to show HideableApplication's window. The reason I need to accomplish this task is because I minimize my Total Commander and FireFox to the Tray and I want to bring them back via a HotKey. Total Commander offers such a functionality but it is broken. On Windows XP I managed to accomplish both these tasks without any problems, using the code I attached. On Windows 7, the behavior is erratic at best, and non-functional at worst. When HideableApplication runs inside Visual Studio everything works: - Trying to reveal it via HideableApplicationRevealer from Visual Studio => SUCCESS - Trying to reveal it via manual execution of HidebleApplicationRevealer.exe from Debug folder => SUCCESS - Trying to reveal it via running HideableApplicationRevealer.exe via keyboard shortcut => SUCCESS - Trying to reveal it via running HIdeableApplicationRevealer.exe via a Scheduled Task with Admin Rights => SUCCESS. When HideableApplication was executed manually (via .exe from Debug folder) AND Visual Studio IS STARTED, it works if I use admin rights or run it manually: - Trying to reveal it via HideableApplicationRevealer from Visual Studio => FAIL - Trying to reveal it via manual execution of HidebleApplicationRevealer.exe from Debug folder => SUCCESS - Trying to reveal it via running HideableApplicationRevealer.exe via keyboard shortcut => FAIL - Trying to reveal it via running HIdeableApplicationRevealer.exe via a Scheduled Task with Admin Rights => SUCCESS. - Trying to reveal it via running HideableApplicationRevealer.exe via keyboard shortcut (start menu) which has been given ADMIN RIGHTS => SUCCESS. When HideableApplication was executed manually (via .exe from Debug folder) AND Visual Studio HAS BEEN SHUT DOWN: it only works if I run it manually (double clic

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups