Basic control: – A controls are object that are placed on form manually by the user or programmer.

Most application retain in visual basic are control placed on the form. Basic control are labels, command button, text box etc. each control has its own properties. Some properties are common to all controls. Some commonly used controls are label, text box, check box, option button, frame control, list box, combo box, image control, shape control, line control, timer control, picture box control and show on.

Label: – The label is a most common control and is used to display text. It can also we use to display text such as status message and other program information this text cannot be edited directly. Some common properties of label control are caption, AutoSize, WordWrap and border style.

Caption properties is used to change the text displayed in the label control. Default caption is label followed by a number. Caption can also we change at run time using code window. Alignment properties helps us to set the alignment of label control to either left justify, right justify or centered. By default the text is left justify. WordWrap help to resize the text entered in the caption properties. This is default behavior of label control. AutoSize properties causes the control to horizontally expand and adjust to the size of its control.

Text box: – A text box control is used to obtain fill-in-the blank information from the user or to display information provided by the application. The user can change the information displayed in a text box. The commonly used properties of the text box control are name, Text, Enabled, MaxLength, MultiLine, ScrollBar, PasswordChar, BorderStyle and MousePointer.

The name properties is used to give a name the text box, by which the text box is identify in the code. The text properties used to change title of the text box. Enabled properties returns or sates the value that determine whether the text box respond to user generated event. MaxLength properties determines the maximum number of character allowed in the text box. The multiline properties returns/set a value that determines whether the text box can accept multiple line of text. Scrollbar properties enables us to attach built-in scrollbar to the text box. Password character properties is used to display specified character when the user type a password. Border style properties provide a thin line around the text. And mouse pointer properties is used to change the mouse pointer shape.

Command button: – Command button which is also known as push button. It is one of the most commonly used controls in user interface. This button is used to begin, interrupt or end of a particular process. It is the appearance of the command button that determines whether it is pressed or released. It contains a label which indicates the action to be performed. Access keys can be attached to command button placing an ampersand sign (&) before the character that we want to function as an access key in the caption properties.

Commonly used properties of command buttons are caption, name and value. The caption properties determines the text displayed on the command button. The name property returns the name used in the code to identify the command button. And value property return or sets a value indicating whether the button is chosen. This properties is not available at designed time and it always available at run time.

Advertisements