BUG: Graph Custom Control Text Disappears in EGA Video Mode (81949)



The information in this article applies to:

  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0

This article was previously published under Q81949

SYMPTOMS

When using the Visual Basic Graph custom control in an EGA video mode with the Graph control Background property value set to dark gray and the Foreground property value set to light gray, the text on the graph will disappear.

CAUSE

This is a known problem with Windows versions 3.0 and 3.1. This is not a problem with the Graph custom control or with Visual Basic.

STATUS

Microsoft has confirmed this to be a problem with Microsoft Windows versions 3.0 and 3.1. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Windows defines dark gray as the color created when red=128, blue=128, and green=128. Windows defines light gray as the color created when red=192, blue=192, and green=192.

Windows, when given light gray text on a dark gray background in EGA video mode, alters the value of the text color to dark gray, which is the closest representation it can make in that video mode. The subsequent dark gray text on a dark gray background makes it appear as though the text has disappeared.

The Visual Basic Graph custom control allows you to set the background and foreground colors to 16 predefined colors. Colors 7 and 8 are light gray and dark gray, respectively. Graph uses Windows values for dark gray and light gray, and so displays the same video problems as Windows itself.

Steps to Reproduce Problem

  1. Set the video mode of Windows to EGA.
  2. Re-enter Windows if necessary and start Visual Basic.
  3. In the Visual Basic environment with the VB Graph custom control loaded, create a form (Form1).
  4. Add a Graph custom control (Graph1).
  5. Set Graph1.DrawMode=2 (draw).
  6. Set Graph1.Background=8 (dark gray) and Graph1.Foreground=7 (light gray).
The text disappears, leaving colored bars on a dark gray background.

Modification Type:MajorLast Reviewed:10/30/2003
Keywords:kbbug KB81949