views:

188

answers:

1

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

+1  A: 

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();
stakx
Nice ! worked like a charm.
joedotnot
HOWEVER i cannot use it because the Toolbar in my MDI parent form doesn't display any images! Googling told me to use Application.DoEvents() but that didn't do anything for me:-( Next step is to use "manifests" whatever that means.. have to look it up.
joedotnot