Color and Background

Forms automatically take on the color scheme that is defined in Microsoft Windows. Therefore, most of the time you do not need to specify colors for your forms. You do have the option, however, of changing the colors for a form if you desire. You could either change the colors in the Properties window for the form that you want to change, or you can write code to change it as well.

There are two color settings that you should be concerned with if you choose to deal with colors on a form. The first color is the back color and is represented by the BackColor property on the form. The back color is the background color of the form. The second color is the foreground color and is represented by the ForeColor property on the form. ...

Get Visual Basic® .NET by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.