Strange Color Behavior

  • Thread starter Jeremy Williams
  • Start date
J

Jeremy Williams

I have a Windows form that contains a panel control, and in that panel
control are a label and a text box. The background color of the label, the
textbox, and the panel are all set to SystemColor.Info (set from the Windows
Forms designer).

When this form is displayed in 256 color mode (specifically on a Terminal
Services machine), the background color displays differently for each
control (I expected them to all work the same). The panel displays the Info
color properly, the textbox displays a hatched pattern for the color, and
the label has a white background. On my own machine (32-bit color), the
color looks the same for all three controls.

I can understand the color not being the same in 256 color mode as it is in
32-bit color mode, but does anyone know why the same color is drawn
differently for each of the three controls? Thanks.
 
H

Herfried K. Wagner [MVP]

* "Jeremy Williams said:
I have a Windows form that contains a panel control, and in that panel
control are a label and a text box. The background color of the label, the
textbox, and the panel are all set to SystemColor.Info (set from the Windows
Forms designer).

When this form is displayed in 256 color mode (specifically on a Terminal
Services machine), the background color displays differently for each
control (I expected them to all work the same). The panel displays the Info
color properly, the textbox displays a hatched pattern for the color, and
the label has a white background. On my own machine (32-bit color), the
color looks the same for all three controls.

I can understand the color not being the same in 256 color mode as it is in
32-bit color mode, but does anyone know why the same color is drawn
differently for each of the three controls? Thanks.

The reason maybe is that Windows uses different methods to fill the
controlsl, but I am not sure about that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top