How to change the color of the check box?

Anyone has a easy way to change the background color of the Checkbox? (not the background color of the caption, just the background of the square of the checker)...
LVL 9
DalinAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mcriderCommented:
Interresting question...
0
caraf_gCommented:
It looks like this is not actually possible. I've heard it mentioned (forgot where) that the colour in the little square is actually made out of a little bitmap. That's why it cannot be changed.

Indeed an interesting question. I hope someone will prove me wrong.
0
amebaCommented:
I normally mention 'windows standards' with this type of question. :)
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

caraf_gCommented:
Hm... did a little test...

Changed the window appearance settings, and, most importantly, the window colour from white to something else. The little square changed too. Bang goes my theory about the bitmap.

I think this is the right moment to mention window standards too. <g>
0
mcriderCommented:
If you really want to do this, what about faking it by using a picturebox...  You could load and clear a picture of a checkbox and have whatever color you want...


Cheers!
0
amebaCommented:
how to add and use custom checkboxes in VB's TreeView control
http://www.mvps.org/btmtz/treeview/

Your Checkbox is in treeview, right?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DalinAuthor Commented:
I am dealing with regular input box.  The user input screen I always change the backcolor when the control(text, combo,) receive focus, and change to another when it is done.

I don't want to change the the windows setting for that.
I guess I have to make my own checkbox for that ability.

ameba, I did get a good tip from the site you posted. So I am awarding you the points.  Thanks,

Thanks to all for your comments.

0
DalinAuthor Commented:
BTW, Condratulations on making the top15 list. Good job, ameba!
0
amebaCommented:
Thanks.
I use color color to indicate value, e.g.:
    ' colorize textbox (black - normal, blue - changes, red - errors)
    If Len(mErrorText) Then
        TextBox.ForeColor = vbRed ' invalid value
    Else
        If TextBox.Parent.loading Then
            TextBox.ForeColor = vbWindowText
        Else
            TextBox.ForeColor = vbHighlight
        End If
    End If

I would like to know what are 'your' colors and if you are putting code in GotFocus/LostFocus of all controls.
0
DalinAuthor Commented:
Before it receive any entry--White
 GotFocus:  Yellow
 LostFocus: Green

I put code in the validating event so the cursor will not leave the box without a valid entery.
0
amebaCommented:
Thanks for the info. It sounds like very good way to improve usability.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.