Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 C# 环境中,将复选框的 CheckState 属性设置为 Indeterminate 会在复选框内显示一个“绿色方块”。
在 VB 环境中,这显示为“灰色检查”(这不太直观,即使对于“虚拟”用户也是如此)。
如何使不确定状态看起来像 VB.NET 中的“绿色方块”?
顺便说一句,我正在使用 VS2008,Winforms 2.0。
(顺便说一句:我尝试创建两个标签 CheckState Indeterminate,这更适合我的问题,但由于点数而被 StackOverflow 禁止!)
您需要为您的应用程序启用 XP 视觉样式才能获得绿色方块。Main在调用之前在你的函数中试试这个Application.Run(...):
Main
Application.Run(...)
Application.EnableVisualStyles();