c# .net4 VisualStyles 有没有办法让表单控件看起来像 XP 下的 Vista/win7 上的样子?

发布于 2024-09-28 06:42:18 字数 225 浏览 0 评论 0原文

你好 我有一个表单,它使用复选框,外观设置为按钮,它在 Win7 上运行良好且看起来不错,但在 XP 上则不然,你无法判断它们是向上还是向下...

所以我可以使表单看起来像无论运行在哪个操作系统上,它都在 W7 上运行吗?

我已经尝试过 this.EnableVisualStyles = true;将其设置为 false 会使窗体在 Win 7 中看起来很糟糕......

干杯

Hi
I have a form that uses checkbox with the appearance set to button and it works well and looks good on Win7 but on XP it doesn't, you cannot tell if they are up or down...

so can I make the form look as it does on W7 regardless of which OS its running on?

I have tried this.EnableVisualStyles = true; and setting it to false makes the form look crap in Win 7...

cheers

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晚雾 2024-10-05 06:42:18

这是不可能的。 EnableVisualStyle 仅启用特定于操作系统的渲染(即非“经典”渲染)。这些按钮始终是特定于操作系统的。

如果您想要独立于操作系统的渲染,则必须使用像 Infragistics 或 Nevron 这样的控制库。但无论如何,我认为这不是一个好主意。在我看来,您的应用程序应该看起来像是集成在操作系统主题中的。

This is not possible. EnableVisualStyle only enables the OS-specific rendering (that is, non "classic" rendering). The buttons are always rendered OS-specific.

If you want OS-independent rendering, you have to use a control libary like Infragistics or Nevron. But I don't think this is a good idea anyway. Your application should look like it is integrated in the os theme in my opinion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文