You shouldn't set ANY colors. Leave it all up to the user to choose them in Windows Display settings. As soon as you start setting colors, you'll run into someone who can't read something due to color/shade blindness and/or run afoul of the American with Disabilities Act.
>Maybe I'm just obtuse, but I never could figure out how to set a chosen background color on a read-only editbox. It always goes to a strange color I can't seem to control, especially when it looses focus. So I have resorted to KeyPress and dangerously simplistic or annoyingly complex keystroke checks.
>
>The other day I stumbled on a way to control the BackColor on an EditBox with ReadOnly set to .T.
>
>I put the editbox in a container of the same size, a zero-width border and the opaque background color I desire. If I want the background to be the same whether or not the editbox has the focus, I need to have the editbox background set to Opaque for some strange reason or it gets wierd again. I set the editbox's DisabledBackColor to the same color as the container just so I can preview and remember the colors when I'm editing, although it doesn't seem to matter at run time. I also set the anchors for the editbox to be anchored all four ways inside the containr so resizing the form works as expected.
>
>The only downsides I've found so far are that I have an extra level of addressing to access the editbox, I have to remember the container when I'm editing the form, and resizing the editbox in the editor is awkward, but I can live with those. (Resizing in the editor is not hard: I just resize the container and then manually set the same height and width for the editbox.)
>
>Like I said, maybe I'm obtuse and have overlooked something obvious to someone else, but in case I haven't, there it is.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer