Microsoft KB Archive/87771

= PRB: THREED Check Box Is Not Grayed Out When Value = 2 in VB =

Article ID: 87771

Article Last Modified on 2/23/2007

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Windows 2000 Readiness Analyzer

-



This article was previously published under Q87771



SYMPTOMS
If the Value property of a THREED Check Box is set to 2, the check box is not made unavailable (grayed out), as you might expect. Instead, an X is displayed in the THREED Check Box. If the Value property of a standard Visual Basic for Windows check box is set to 2, the check box is made unavailable.



CAUSE
There is no disabled state for a THREED check box. The value property of a THREED check box can only be true or false (0 or 1) whereas the standard check box can have a value of 0, 1, or 2.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Start Visual Basic or from the File menu, choose New Project (ALT, F, N) if Visual Basic is already running. Form1 is created by default. From the File menu, choose Add File. In the Files box, select the THREED.VBX custom control file. Place one THREED Check Box, one standard check box, and three command buttons on Form1.  Enter the following code in the appropriate event procedures: Sub Form_Load Command1.Caption = &quot;Value = 0&quot; Command2.Caption = &quot;Value = 1&quot; Command3.Caption = &quot;Value = 2&quot; End Sub

Sub Command1_Click Check1.Value = 0 Check3D1.Value = 0 End Sub

Sub Command2_Click Check1.Value = 1 Check3D1.Value = 1 End Sub

Sub Command3_Click Check1.Value = 2 Check3D1.Value = 2 End Sub  Press F5 to run the program. First, click the Value = 0 button. Then click the Value = 1 button. Finally, click the Value = 2 button. When you click the Value = 2 button, the standard check box is disabled (grayed) but the THREED check box is not.</ol>

Additional query words: 1.00 2.00 3.00 grey greyed 3d

Keywords: kbprb KB87771

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.