问题
I have a .NET Winform with a background image, and testing just reported the BackgroundImage is hidden when display settings in Win7 are set to high contrast mode. I understand why MS does this by default, but I'm hoping there is a way to override this behavior without changing the layout of my form? I'd rather not move my click events and such to another image control that I add on top of the form to simulate a background (and then also have to move my transparent PNGs to be contained by that as well)... we are in late stage of testing, so the less changes the better.
The "background" really isn't a typical background, it has text and important content on it that should not be hidden EVER. Sure, you can -1 me for bad design, but hey, it seemed to work up until this minor issue ;)
回答1:
This is just a guess: Will it hide the image if you use a monochrome image? You can then check at runtime (System.Windows.Forms.SystemInformation.HighContrast for WinForms or System.Windows.SystemParameters.HighContrast for WPF) and set it to the appropriate image.
来源:https://stackoverflow.com/questions/11110050/keep-form-backgroundimage-visible-in-high-contrast-mode