I am developing a program in C # .net 3.5 wpf. It should work on Windows XP, Windows Vista and Windows 7. On new operating systems, I want to create a background in Aero Glass. So this is just a special design. After hibernation, after pausing, or after changing windows. Turning to the basic design and back to the aero, all added glass is displayed completely black.
I am showing Glass through the GlassHelper class (can be found on Google).
In fact, I see three ways to solve this problem. First, yes, to solve this. But I read somwhere that this is a bug in Windows-driven code, so I have no way to resolve it. Correct me if I am wrong.
Therefore, I had the idea to close the window every time, it was minimized and fully restored when it was used the next time.
It works very well. After hibernation, the window is still displayed in black, but I do not need to leave the application, but I can still minimize it and increase it again.
Now I see the ways:
1) I close the window every time the computer pauses, hibernates or changes the design. And I again open this window when it is saved. But how can I handle this?
2) I accept that the window will be displayed in black until someone minimizes it. (Not my favorite) But then I have a new problem: a button on the taskbar. (Not a tray icon). I need it to display forever. In winxp, I need to open a window when it is minimized. And especially on win7, I need this because I want to use some of the new advantages of Superbar! (Previewing with hoovering will not be a window, it will be a static image.)
Thanks everyone for the help!