Friday, May 24, 2019

Visual Basic Toolbox Controls

The Toolbox Controls The Toolbox windowpane holds all of the controls available to your VB. loot programs. Basic Controls First, lets focus on the basic controls that atomic number 18 use in most programs. These controls are so essential that VB. NET would be utterly useless without them 1- acquittance The Button control is a key ing vehementient for an effective user interface. Buttons are normally found on the primary(prenominal) form of a program and are used to perform tasks or bring up additional forms for the user. Notable Properties Important Properties of Button1 from PropertiesWindow AppearanceAppearance role of the propertieswindowallows us to make changes to theappearanceof the Button. With the help of BackColorandBackground Imageproperties we potful intend a accent colorand a background image to the button. We knack the font color and font style for the school textual matter that appears on button withForeColorand theFont position. We change the appearancestyle of the button with theFlatStyle retention. We can change the text that appears on button with theTextproperty and with theTextAlignproperty we can set where on the button the text should appear from a predefined set of options. BehaviorNotable Behavior properties of the Button are theEnabledandVisibleproperties. The Enabled property is set to True by default which makes the button enabled and setting itsproperty toFalse makes the button Disabled. With the Visible property we can make the Button Visible or Invisible. The default esteem is set to True and to make the button Invisible set its property toFalse. Layout With theLocationproperty you can change the location of the button. With the Size property you can set the size of the button. 2- CheckBox The CheckBox control is a Boolean control that can be set to true or false.When the controls value is true, the check box will be filled with a small x. Notable Properties Important properties of theCheckBoxin theAppearancesection of t he propertieswindoware Appearance neglect value is Normal. Set the value to Button if you want theCheckBoxto bedisplayedas a Button. BackgroundImage use to set abackground imagefor thecheckbox. CheckAlign Used to set thealignmentfor theCheckBoxfrom a predefined list. Checked Default value is False, set it to True if you want theCheckBoxto bedisplayedas checked. CheckState Default value is Unchecked. Set it to True if you want a check to appear.When set to Indeterminate it displays a check in gray background. FlatStyle Default value isStandard. Select the value from a predefined list to set the style of thecheckbox. 3- Label The Label control is used to display static labels on a form that generally dont change while a program is running. The labels are commonly used alongside TextBox controls to describe the information sto red in the TextBox 4- LinkLabel The LinkLabel control is a specialized version of the Label control, which includes an Internet hyperlink so that when you click the label, the link is opened in the default Web browser (or e-mail program). RadioButton The RadioButton control is useless by itself because a mouse click can only set the value to true, not false (as is the case with CheckBox). RadioButton controls are only useful if two or more are placed together on a form or other container (such as a GroupBox), because they reflect a multiple-choice value as indicated by the selected control, not an individual true/false value. Notable Properties Important properties of the RadioButton in theAppearancesection of the propertieswindoware Appearance Default value is Normal.Set the value to Button if you want the RadioButton to bedisplayedas a Button. BackgroundImage Used to set abackground imagefor the RadioButton. CheckAlign Used to set thealignmentfor the RadioButton from a predefined list. Checked Default value is False, set it to True if you want the RadioButton to bedisplayedas checked. FlatStyle Default value isStandard. Select the valu e from a predefined list to set the style of the RadioButton. TextBox The TextBox control is a multi-purpose keyboard input and text output control capable of displaying multiple lines of text with automatic word wrapping.Some Notable Properties Some important properties in the Behavior section ofthe PropertiesWindowforTextBoxes. Enabled Default value is True. To disable,set theproperty toFalse. Multiline Setting thisproperty toTrue makes the TextBox multiline which allows to accept multiple lines of text. Default value is False. PasswordChar Used to set the password character. The text displayed in the TextBox will be the character set by the user. Say, if you enter *, the text that is entered in the TextBox is displayed as *. ReadOnly Makes this TextBox readonly.It doesnt allow to enter any text. Visible Default value is True. To hide it set theproperty toFalse. Important properties in theAppearancesection TextAlign Allows to align the text from three possibleoptions. The default value is left and you can set thealignmentof text to right or center. Scrollbars Allows to add ascrollbarto a Textbox. Very useful when the TextBox is multiline. You have fouroptionswiththis property. Optionsare are None, Horizontal, Vertical and Both. Depending on the size of the TextBox anyone of those can be used

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.