Winforms Checkbox : CheckState property Indeterminate renders differently
Pergunta
In C# environment, setting a checkbox's CheckState property to Indeterminate displays a "green square" inside the checkbox.
In VB environment, this displays as a "grayed out check" (which is less intuitive, even for "dummy" users).
How do i make Indeterminate state look like a "green square" in VB.NET ?
Btw, i am using VS2008, Winforms 2.0.
(Btw2: I tried to create two tags CheckState Indeterminate, which is more appropriate to my question, but disallowed by StackOverflow due to points!)
Solução
You need to enable XP visual styles for your application to get the green square. Try this in your Main
function before calling Application.Run(...)
:
Application.EnableVisualStyles();
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow