Microsoft KB Archive/78892

= BUG: Multiline Text Box Contents Not Gray When Enabled=False =

Article ID: 78892

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q78892



SYMPTOMS
When the MultiLine property of a text box is True (-1) and the Enabled property is False (0), text inside the text box displays incorrectly as black instead of gray.



WORKAROUND
To work around the problem, set the ForeColor property of the text box to gray when the Enabled property is set to False (-1) as shown in the example below. '*** In the global module: *** Global Const WINDOW_TEXT = &H80000008   ' from CONSTANT.TXT Global Const GRAY_TEXT = &H80000011     ' from CONSTANT.TXT

' *** In the form: *** ' to disable a multi-line text box text1.Enabled = 0                   ' disable text1.ForeColor = GRAY_TEXT         ' gray

' to enable a multi-line text box text1.Enabled = -1                  ' enable text1.ForeColor = WINDOW_TEXT       ' black



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: buglist1.00 buglist2.00 buglist3.00 2.00 3.00

Keywords: kbbug KB78892

-

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

© Microsoft Corporation. All rights reserved.