Getting Window backgroud color

  • Thread starter Thread starter Oded Kovach
  • Start date Start date
O

Oded Kovach

Hello there

When I create new form its background color is the same as the windows
background color (according to the declirations of Windows).

But when i change it to a diffrent color it's being paint with diffrent
color no metter the windows decliration

Is there a way after i change the form backgroud color to change it back to
be Windows color?

any help would be useful
 
Oded said:
When I create new form its background color is the same as the windows
background color (according to the declirations of Windows).

But when i change it to a diffrent color it's being paint with diffrent
color no metter the windows decliration

Is there a way after i change the form backgroud color to change it back to
be Windows color?


The Windows colors are specified by using the System COlor
codes, which are negative color values. If you create a new
vorm and look at its backcolor, you can see the special
number that's used. Then just Copy/Paste it into your code
that switches the color back and forth.

If somecondition Then
Me.Section(0).BackColor = vbRed
Else
Me.Section(0).BackColor = -2147483633
End If
 
Back
Top