Microsoft KB Archive/262036

= BUG: eVB: ComboBox Text Property Ignores ForeColor Property Value =

Article ID: 262036

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft eMbedded Visual Basic 3.0

-



This article was previously published under Q262036



SYMPTOMS
The Text property of a ComboBox control ignores the value of the ForeColor property. Therefore, the text of the selected item in the ComboBox control is always black, while the items in the drop-down portion of the ComboBox match the value of the ForeColor property.



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 Behavior
 Open Microsoft eMbedded Visual Basic 3.0. Create a new Windows CE for the Pocket PC project. Form1 is created by default. Add a ComboBox control and two CommandButton controls to Form1. Change the ForeColor property of the ComboBox to Red or choose any color from the color palette.  Paste the following code into the code window for Form1: Option Explicit

Private Sub Command1_Click Combo1.ForeColor = &H4000& End Sub

Private Sub Command2_Click App.End End Sub

Private Sub Form_Load Command1.Caption = &quot;Change to Green&quot; Command2.Caption = &quot;Exit&quot; Combo1.AddItem &quot;One&quot; Combo1.AddItem &quot;Two&quot; Combo1.AddItem &quot;Three&quot; End Sub

Private Sub Form_OKClick App.End End Sub  Run the project on the device or the emulator. Note that the text in Combo1 is black even though you changed the ForeColor property at design time.</li> Select an item from the drop-down list. Note that the items in the drop-down list match the color specified in the ForeColor property. However, the selected item changes to black.</li></ol>

Keywords: kbbug kbpending KB262036

-

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

© Microsoft Corporation. All rights reserved.