tags:

views:

285

answers:

1

We have an application developed in C# with WPF (.NET Framework 3.0)

The main window has a glass border, and a child window containing a WebBrowser is centered within it:

WPF main window 
  -> Child window - frame control 
    -> Page 
      -> WindowsFormsHost
        -> WebBrowser

Because we used .NET 3.0, we have to put WebBrowser in WindowsFormsHost, and it can't show if we set the window property AllowTransparency to true.

Now, on Windows XP, when the user clicks the Shutdown button on the Start menu, a dialog is displayed with various choices (shutdown, restart, etc.) while behind it the entire desktop appears to fade from color to shades of gray. When this occurs, our main window becomes hidden, while the page window is still displayed on the screen.

We have already set page window's owner to be the main window, but this did not help. Therefore, I have come to the conclusion that I must intercept the "fade to gray" event and... do something to mitigate this ugliness. So: does anyone know how I might allow my program to be notified prior to the fade to gray?

+1  A: 

As I know there is no way to be notified when Windows fades the screen to gray. System.SystemEvents class doesn't have such an event either.

M. Jahedbozorgan
what should we do to fix this issue?and we used Spy++ to capture events while the background fade to gray, but get no event related. :(
Cooper.Wu