Microsoft KB Archive/813416

= FIX: Cannot See ListView and TreeView Check Boxes When You Use the High Contrast Black Color Scheme =

Article ID: 813416

Article Last Modified on 10/7/2005

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Windows XP Professional

-



SYMPTOMS
When you use the TreeView control or the ListView control in Visual Basic 6.0, and you select the CheckBoxes option, you cannot see these check boxes under some Windows color schemes such as High Contrast Black. The TreeView and ListView controls are from Microsoft Windows Common Controls 6.0 (Mscomctl.ocx).



CAUSE
This behavior occurs because the mask color for these controls is hard-coded. Windows uses the mask color to draw the check boxes. This hotfix addresses the problem by using a mask color that is based on the current Windows color scheme.



RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem described in this article. Only apply it to systems that are experiencing this specific problem. This fix may receive additional testing to further ensure product quality. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Visual Studio 6 Service Pack 6 that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time   Version    Size       File name --  20-Jan-2003  22:42  6.0.97.40  1,062,160  Mscomctl.ocx



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
 Create a new Visual Basic 6.0 Standard EXE project. By default, Form1 is created. On the Components menu, click Projects, and then add a reference to Microsoft Windows Common Controls 6.0 (Mscomctl.ocx). Add a ListView control (ListView1) and a TreeView control (TreeView1) to Form1. For each control, right-click the control, click to select the CheckBoxes option, and then click OK.  Add the following code to Form1: Private Sub Form_Load TreeView1.Nodes.Add, , , &quot;Test&quot; ListView1.ListItems.Add, , &quot;Test&quot; End Sub </li> Run the project. Verify that the check boxes in both controls are visible, and that you can click to select them.</li> Open the Windows Display Properties dialog box. To do this, right-click the desktop, and then click Properties. (You can also do this by opening Control Panel, and then double-clicking Display.)</li> Click the Appearance tab, select High Contrast Black in the Scheme list box, and then click OK.</li> Run the project again. Note that you cannot see the check boxes.</li></ol>

Keywords: kbbug kbfix kbqfe kbaacc kbvbp600fix KB813416

-

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

© Microsoft Corporation. All rights reserved.