Getting Window backgroud color

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
 
M

Marshall Barton

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
 

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