Changes

Visual Basic and Forms

1,958 bytes added, 19:20, 18 July 2007
Changing the Form Title
Each form represents an application window. The text displayed in the title bar for each window should be changed to display something meaningful. This should eiher be the name of application, or a description of the form's function (for example ''Order Entry'' or ''Sales Report'').
The value of the text to be displayed in the window title is defined by the form's ''Text'' property. To change the title of the form, therefore, select the ''Text'' value in the Property ''Properties'' panel and change it to a new value (for example, 'My Form Example'): [[Image:Exampl.jpg]] == Changing the Form Background Color == The background of any form may be changed either by specifying a new color, or by using a background image. The background color is controlled by the ''BackColor'' property of the form. By default this property is set to ''Control''. This specifies that the form should use a system defined default color. This color varies between different Windows versions, and changes when the user changes the overall color scheme of their Windows system.  To change the background color, select the form in Visual Studio and locate the ''BackColor'' property in the ''Properties'' panel. There are a number of ways to specify a color. * Color by name - Simply type in a color name into the ''BackColor'' value field (for example ''Red'', ''Yellow'', ''Cyan'' etc). * Color by RGB value - Colors may be specified by entering the hexadecimal RGB values (for example #FFFFFF for white, #000000 for while and so on). RGB values may also be specified using decimal values (for example 255,255,255 for white, 0,0,0 for black etc). * Color from existing palette - Clicking on the down arrow in the ''BackColor'' value field will display a drop down menu. Lists are available for web safe colors, custom colors and system colors. Once you have selected a new color the background color of your form will change to reflect the new setting: [[Image:Exampl.jpg]] == Changing The Form Background Image == In addition to changing the background color of a form, it is also possible to specify a background image. This is specified using the form's ''BackgroundImage'' property in the ''Properties'' panel. When the 'BackgroundImage'' property is selected in the Property panel a button containing the label '...' appears. Click on this button to display the ''Select Resource'' window: [[Image:Exampl.jpg]] Click on the ''Local Resource'' option button and click on ''Import'' to browse for an image.