Saturday, November 23, 2019
Visual Basic Toolbox Controls Essay Example
Visual Basic Toolbox Controls Essay Example Visual Basic Toolbox Controls Essay Visual Basic Toolbox Controls Essay The Toolbox Controls The Toolbox window holds all of the controls available to your VB. NET programs. Basic Controls First, letââ¬â¢s focus on the basic controls that are used in most programs. These controls are so essential that VB. NET would be utterly useless without them 1- Button The Button control is a key ingredient for an effective user interface. Buttons are normally found on the main 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 Propertiesà Window: Appearance Appearanceà section of the propertiesà windowà allows us to make changes to theà appearanceà of the Button. With the help ofà BackColorà andà Background Imageà properties we can set a background colorà and a background image to the button. We set the font color and font style for the text that appears on button withà ForeColorà and theà Fontà property. We change the appearanceà style of the button with theà FlatStyleà property. We can change the text that appears on button with theà Textà property and with theà TextAlignà property we can set where on the button the text should appear from a predefined set of options. Behavior Notable Behavior properties of the Button are theà Enabledà andà Visibleà properties. The Enabled property is set to True by default which makes the button enabled and setting itsà property toà False makes the button Disabled. With the Visible property we can make the Button Visible or Invisible. The default value is set to True and to make the button Invisible set its property toà False. Layout With theà Locationà property 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 controlââ¬â¢s value is true, the check box will be filled with a small x. Notable Properties Important properties of theà CheckBoxà in theà Appearanceà section of the propertiesà windowà are: Appearance: Default value is Normal. Set the value to Button if you want theà CheckBoxà to beà displayedà as a Button. BackgroundImage: Used to set aà background imageà for theà checkbox. CheckAlign: Used to set theà alignmentà for theà CheckBoxà from a predefined list. Checked: Default value is False, set it to True if you want theà CheckBoxà to beà displayedà as 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 isà Standard. Select the value from a predefined list to set the style of theà checkbox. 3- Label The Label control is used to display static labels on a form that generally donââ¬â¢t 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 con trol, not an individual true/false value. Notable Properties Important properties of the RadioButton in theà Appearanceà section of the propertiesà windowà are: Appearance: Default value is Normal. Set the value to Button if you want the RadioButton to beà displayedà as a Button. BackgroundImage: Used to set aà background imageà for the RadioButton. CheckAlign: Used to set theà alignmentà for the RadioButton from a predefined list. Checked: Default value is False, set it to True if you want the RadioButton to beà displayedà as checked. FlatStyle: Default value isà Standard. Select the value 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 ofà the Propertiesà Windowà forà TextBoxes. Enabled: Default value is True. To disable,à set theà property toà False. Multiline: Setting thisà property toà True 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 theà property toà False. Important properties in theà Appearanceà section TextAlign: Allows to align the text from three possibleà options. The default value is left and you can set theà alignmentà of text to right or center. Scrollbars: Allows to add aà scrollbarà to a Textbox. Very useful when the TextBox is multiline. You have fourà optionsà withà this property. Optionsà are are None, Horizontal, Vertical and Both. Depending on the size of the TextBox anyone of those can be used
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.