保持Form.BackgroundImage高对比度模式下可见 [英] Keep Form.BackgroundImage visible in high contrast mode

查看:178
本文介绍了保持Form.BackgroundImage高对比度模式下可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.NET的Winform与背景图像和测试刚刚公布时,在Win7显示设置被设置为高对比度模式和backgroundImage是隐藏的。我明白了为什么MS在默认情况下做到这一点,但我希望能有一种方法可以覆盖这种行为不改变我的布局形式?我宁愿不动我的点击事件和这样到另一个图像控制,我在窗体上添加模拟背景(然后还得将我由该也包含透明的PNG)...我们是在测试的后期阶段,所以少转机。

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.

背景真的不是一个典型的背景下,有文字和重要内容,它应该不EVER隐藏。当然,你可以-1我要糟糕的设计,但嘿,这似乎工作,直到这个小问题;)

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 ;)

推荐答案

这只是一个猜测:它会隐藏图像,如果您使用的是黑白图像?然后,您可以检查在运行时( System.Windows.Forms的。 SystemInformation.HighContrast 获得的WinForms或 System.Windows .SystemParameters.HighContrast 为WPF),并将其设置为相应的图像。

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.

这篇关于保持Form.BackgroundImage高对比度模式下可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆