Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
527 views
38 pages
Propereties of Toolbox Controls in VB
VB standard control properties
Uploaded by
salembalki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PPTX, PDF or read online on Scribd
Download
Save
Save Propereties of Toolbox Controls in VB For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
527 views
38 pages
Propereties of Toolbox Controls in VB
VB standard control properties
Uploaded by
salembalki
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PPTX, PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Propereties of Toolbox Controls in VB For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save Propereties of Toolbox Controls in VB For Later
You are on page 1
/ 38
Search
Fullscreen
BASIC CONTROLS Object An object is a type of user interface element you create on a Visual Basic form by using a toolbox control. In fact, in Visual Basic, the form itself is also an object. You can move, resize, and customize objects by setting object properties.BASIC CONTROLS A property is a value or characteristic held by a Visual Basic object, such as Caption or Fore Color. Properties can be set at design time by using the Properties window or at run time by using Statements in the program code. Object. Property = Value Where Object is the name of the object you're customizing. Property is the characteristic you want to change. Value is the new property setting. For example, Command1.Caption = "Hello"BASIC CONTROLS 1.The Form Object * The Form is where the user interface is drawn. It is central to the development of Visual Basic applications. * Form Properties: © Appearance Selects 3-D or flat appearance. © BackColor Sets the form background color. o BorderStyle Sets the form border to be fixed or sizeable. o Caption sets the form window titleBASIC CONTROLS Enabled If True, allows the form to respond to mouse and keyboard events; if False, disables form. Font Sets font type, style, size. ForeColor Sets color of text or graphics. Picture Places a bitmap picture in the form. Visible If False, hides the form.BASIC CONTROLS Form Events: Activate Form_Activate event is triggered when form becomes the active window. Click Form_Click event is triggered when user clicks on form. DblClick Form_DblClick event is triggered when user doubleclicks on form. Load Form_Load event occurs when form is loaded. This is a good place to initialize variables and set any runtime properties.BASIC CONTROLS ¢ Form Methods: ¢ Cls Clears all graphics and text from form. Does not clear any objects. ° Print Prints text string on the form. ° Examples frmExample.Cls ' clears the form frmExample.Print "This will print on the form"BASIC CONTROLS 2. CommandButton The Command Button control is use to create buttons with a variety of uses on a form. A command button is the most basic way to get user input while a program is running. By clicking a command button, the user requests that a specific action be taken in the program. Visual Basic terms, clicking a command button creates an event, which must be processed in your program.BASIC CONTROLS Command Button Properties: Appearance Cancel Caption Default Font Selects 3-D or flat appearance. Allows selection of button with Esc key (only one button on a form can have this property True). String to be displayed on button. Allows selection of button with Enter key (only one button on a form can have this property True). Sets font type, style, size.BASIC CONTROLS Command Button Events: Click Event triggered when button is selected either by clicking on it or by pressing the access key. . Label Boxes Label, the simplest contro! in the Visual Basic toolbox, displays formatted text on a user interface form. Typical uses for the Label control include: Help text Program splash screen headings Formatted output, such as names, times, and dates Descriptive labels for other objects, including text boxes and list boxes.BASIC CONTROLS Label Properties: Alignment Appearance AutoSize BorderStyle Caption Font Aligns caption within border. Selects 3-D or flat appearance. If True, the label is resized to fit the text specifed by the caption property. If False, the label will remain the size defined at design time and the text may be clipped. Determines type of border. String to be displayed in box. Sets font type, style, size.BASIC CONTROLS ¢ Label Events: * Click Event triggered when user clicks on a label. + DblClick Event triggered when user double-clicks on a label. 4.Textbox + A Textbox is used to display information entered at design time, by a user at run-time, or assigned within code. * The displayed text may be edited. + The Textbox control is one of the most versatile tools in the Visual Basic toolbox.¥ BASIC CONTROLS This control performs two functions: Displaying output (such as operating instructions or the contents of a file) on a form. Receiving text (such as names and phone numbers) as user input. Text Box Properties: Appearance —: Selects 3-D or flat appearance. BorderStyle — : Determines type of border. Font : Sets font type, style, size.BASIC CONTROLS 4. MaxLength : Limits the length of displayed text (0 value indicates unlimited length). 5. MultiLine : Specifies whether text box displays single line or multiple lines. 6. PasswordChar :Hides text with a single character. 7. ScrollBars :Specifies type of displayed scroll bar(s). 8. SelLength :Length of selected text (run-time only). 9. SelStart :Starting position of selected text (run-time only). 10.SelText :Selected text (run-time only). 11-Tag : Stores a string expression. 12.Text :Displayed textig 2. we BASIC CONTROLS * Text Box Events: Change LostFocus KeyPress :Triggered every time the Text property changes. :Triggered when the user leaves the text box. This is a good place to examine the contents of a text box after editing. : Triggered whenever a key is pressed. Used for key trapping, as scen in last class.BASIC CONTROLS 5. Check Boxes * Check boxes provide a way to make choices from a list of potential candidates. + Some, all, or none of the choices in a group may be selected * Check Box Properties: + Caption :Identifying text next to box. * Font :Sets font type, style, size. * Value :Indicates if unchecked (0, vbUnchecked), checked (1,vbChecked), or grayed out (2, vbGrayed).BASIC CONTROLS Check Box Events: Click :Triggered when a box is clicked. Value property is automatically changed by Visual Basic. Option Buttons Option buttons provide the capability to make a mutually exclusive choice among a group of potential candidate choices. Hence, option buttons work as a group, only one of which can have a True (or selected) value.BASIC CONTROLS Option Button Properties: Font Value . Caption :Identifying text next to button. :Sets font type, style, size. Indicates if selected (True) or not (False). Only one option button in a group can be True. One button in each group of option buttons should always be initialized to True at design time.BASIC CONTROLS . List Boxes A list box displays a list of items from which the user can select one or more items. If the number of items exceeds the number that can be displayed, a scroll bar is automatically added. List Box Properties: Appearance :Selects 3-D or flat appearance. List :Array of items in list box. ListCount :Number of items in list.S: BASIC CONTROLS ListIndex MultiSelect . Selected . Sorted . Text :The number of the most recently selected item in list.If no item is selected, ListIndex = -1 :Controls how items may be selected (0-no multiple selection allowed, 1-multiple selection allowed, 2-group selection allowed). :Array with elements set equal to True or False,depending on whether corresponding list item is selected. :True means items are sorted in ‘Ascii’ order, else items appear in order added. : Text of most recently selected item.BASIC CONTROLS List Box Events: Click Event triggered when item in list is clicked. DbIClick :Event triggered when item in list is double-clicked.Primary way used to process selection. List Box Methods: AddItem :Allows you to insert item in list. Clear :Removes all items from list box. Removeltem :Removes item from list box, as identified by index of item to remove. Examples IstExample.AddItem "This is an added item" ' adds text string to list IstExample.Clear ' clears the list box IstExample.Removeltem 4 ' removes IstExample.List(4) from list boxBASIC CONTROLS Combo Boxes The combo box is similar to the list box. The differences are a combo box includes a text box on top of a list box and only allows selection of one item. In some cases, the user can type in an alternate response. Combo Box Properties: Combo box properties are nearly identical to those of the list box, with the deletion of the MultiSelect property and the addition of a Style property.BASIC CONTROLS Appearance Selects 3-D or flat appearance. List Array of items in list box portion. ListCount Number of items in list. ListIndex The number of the most recently selected item in list.If no item is selected, ListIndex = -1 Sorted True means items are sorted in order, else items appear in order added. Style Selects the combo box form.Style Dropdown combo; user can change selection.Style = 1, Simple combo; user can change selection. Style = 2, Dropdown combo; user cannot change selection. Text Text of most recently selected item.BASIC CONTROLS Combo Box Event: Click Event triggered when item in list is clicked DbIClick Event triggered when item in list is double- clicked.Primary way used to process selection Combo Box Methods: AddItem Allows you to insert item in list. Clear Removes all items from list box. Removeltem Removes item from list box, as identified by index of item to remove. Examples cboExample.Addltem "This is an added item" ' adds text string to list cboExample.Clear " clears the combo box cboExample.Removeltem 4 ' removes cboExample.List(4) from list boxBASIC CONTROLS * Horizontal and Vertical Scroll Bars * Horizontal and vertical scroll bars are widely used in ‘Windows applications. + Scroll bars provide an intuitive way to move through a list of information and make great input devices. * Scroll Bar Properties: 1. LargeChange Increment added to or subtracted from the scroll bar Value property when the bar area is clicked. 2. Max The value of the horizontal scroll bar at the far right and the value of the vertical scroll bar at the bottom.Can range from -32,768 to 32,767.BASIC CONTROLS 3. Min 4. SmallChange 5. Value The other extreme value - the horizontal scroll bar at the left and the vertical scroll bar at the top. Can range from - 32,768 to 32,767. The increment added to or subtracted from the scroll bar Value property when either of the scroll arrows is clicked. The current position of the scroll box (thumb) within the scroll bar. If you set this in code, Visual Basic moves the scroll box to the proper position.BASIC CONTROLS Min lef SmalChange Layghange \ Salchange LargeChange—- Min p i ! Ne >) Mex =t+— Value ‘SmaliChange Value LargeChange — LargeChange ‘SmallChange—=o) MaxBASIC CONTROLS Picture Boxes The picture box allows you to place graphics information on a form. It is best suited for dynamic environments - for example, when doing animation. Picture boxes lie in the top layer of the form display. They behave very much like small forms within a form, possessing most of the same properties as a form.BASIC CONTROLS AutoSize If True, box adjusts its size to fit the displayed graphic. Font Sets the font size, style, and size of any printing done in the picture box. Picture Establishes the graphics file to display in the picture box. Picture Box Events: Click Triggered when a picture box is clicked. DbIClick Triggered when a picture box is double- clicked. Example picExample.Picture = LoadPicture("'c:\pix\sample.bmp")BASIC CONTROLS Frames provide a way of grouping related controls on a form And, in the case of option buttons, frames affect how such buttons operate Frames Option buttons within a frame work as a group, independently of option buttons in other frames. Option buttons on the form, and not in frames, work as another independent group. That is, the form is itself a frame by default.BASIC CONTROLS ¢ It is important to note that an independent group of option buttons is defined by physical location within frames, not according to naming convention. ¢ That is, a control array of option buttons does not work as an independent group just because it is a control array. ¢ It would only work as a group if it were the only group of option buttons within a frame or on the form.BASIC CONTROLS Biel Es Framet eee : 7 Optiont IP Check I Check4 © Option2 7 Option’ Bo I” Check5 I Checks 7 Check6 Frame2 © Options Option5 € Option& © Option? Command! Command2 |BASIC CONTROLS ° Shape Tool ° The shape tool can create circles, ovals, squares, rectangles, and rounded squares and rectangles. ° Colors can be used and various fill patterns are available. * Shape Tool Properties: 1. BackColor Determines the background color of the shape (only used when FillStyle not Solid. 2. BackStyle Determines whether the background is transparent or opaque.BASIC CONTROLS BorderColor BorderStyle BorderWidth fillColor Determines the color of the shape's outline. Determines the style o the shape's outline. The border can be transparent, solid, dashed, dotted, and combinations. Determines the width of the shape border line. Defines the interior color of the shape.BASIC CONTROLS 7. FillStyle Determines the interior pattern of a shape. Some choices are: solid, transparent, cross, etc. 8. Shape Determines whether the shape is a square, rectangle, circle, or some other choice. The Line Control ¢ Like the shape control, the line control is a graphical control. ¢ Line is use it to display horizontal, vertical, or diagonal lines in a form.BASIC CONTROLS We can use these controls at design time as a design element or at runtime to alter the original line you drew. It can also change a line at runtime by changing its X1, X2, Y1, and Y2 properties. Line Tool Properties: BorderColor Determines the line color. BorderStyle Determines the line 'shape’. Lines can be transparent, solid, dashed, dotted, and combinations. BorderWidth Determines line width.BASIC CONTROLS The Timer Control ‘You use a timer control when you want to execute code at specific intervals. Many times, especially in using graphics, we want to repeat certain operations at regular intervals. The timer tool allows such repetition. The timer tool does not appear on the form while the application is running.BASIC CONTROLS The Timer Control Timer Properties: Enabled Used to turn the timer on and off. When on, it continues to operate until the Enabled property is set to False. Interval Number of milliseconds between each invocation of the Timer Event
You might also like
Visual Basic (III CS III BCA III IT-Sem5) - 240620 - 220422
PDF
No ratings yet
Visual Basic (III CS III BCA III IT-Sem5) - 240620 - 220422
110 pages
Visual Basic Tutorial
PDF
100% (1)
Visual Basic Tutorial
169 pages
Visual Objects
PDF
No ratings yet
Visual Objects
58 pages
Use of All Basic Controls@
PDF
100% (1)
Use of All Basic Controls@
119 pages
Visual Basics Asgnmnt 1
PDF
No ratings yet
Visual Basics Asgnmnt 1
83 pages
Visual Programming - PDF
PDF
100% (1)
Visual Programming - PDF
143 pages
Cit2457 VB Unit 4
PDF
No ratings yet
Cit2457 VB Unit 4
13 pages
Introduction To Visual Basic Programming
PDF
No ratings yet
Introduction To Visual Basic Programming
41 pages
Visual Objects
PDF
No ratings yet
Visual Objects
57 pages
Controls
PDF
No ratings yet
Controls
14 pages
Anay Dev VB - NET Practical File
PDF
No ratings yet
Anay Dev VB - NET Practical File
51 pages
VB Unit 5 Notes
PDF
No ratings yet
VB Unit 5 Notes
14 pages
Program Exercises
PDF
0% (2)
Program Exercises
9 pages
Unit I VB 6.0 Notes
PDF
No ratings yet
Unit I VB 6.0 Notes
31 pages
Visual Basic Basics Notes
PDF
No ratings yet
Visual Basic Basics Notes
7 pages
Lecture 2 - VB - NET IDE
PDF
No ratings yet
Lecture 2 - VB - NET IDE
35 pages
SCS 211 Visual Basic Programming
PDF
No ratings yet
SCS 211 Visual Basic Programming
3 pages
Practical Program
PDF
100% (1)
Practical Program
8 pages
Index: S NO. Topics No. Teacher Sign
PDF
100% (1)
Index: S NO. Topics No. Teacher Sign
62 pages
Visual Basic 6.0 - Short Notes: Unit 1 Customizing A Form
PDF
No ratings yet
Visual Basic 6.0 - Short Notes: Unit 1 Customizing A Form
11 pages
VB6.0 Notes
PDF
No ratings yet
VB6.0 Notes
120 pages
OS Practical File
PDF
75% (4)
OS Practical File
15 pages
Modern Form + Font Awesome Icons, WinForm, C # - VB - Net - RJ Code Advance
PDF
No ratings yet
Modern Form + Font Awesome Icons, WinForm, C # - VB - Net - RJ Code Advance
15 pages
VB Question Bank
PDF
60% (5)
VB Question Bank
13 pages
My Project
PDF
No ratings yet
My Project
66 pages
Pointers, Stack & Heap Memory, Malloc
PDF
100% (1)
Pointers, Stack & Heap Memory, Malloc
4 pages
Visual Basic Notes
PDF
No ratings yet
Visual Basic Notes
115 pages
A STUDY OF FIREWORK INDUSTRY ON THE HEALTH PROJECT-compressed
PDF
No ratings yet
A STUDY OF FIREWORK INDUSTRY ON THE HEALTH PROJECT-compressed
66 pages
Visual Basic6
PDF
No ratings yet
Visual Basic6
31 pages
Assignment Based On Dot Net Technology (303) Bca Iii Year Session:-2020 - 2021
PDF
No ratings yet
Assignment Based On Dot Net Technology (303) Bca Iii Year Session:-2020 - 2021
24 pages
Note On Visual Programming-1
PDF
No ratings yet
Note On Visual Programming-1
3 pages
Visual Programming Lecture 01
PDF
No ratings yet
Visual Programming Lecture 01
63 pages
Debugging and Program Testing
PDF
No ratings yet
Debugging and Program Testing
17 pages
Visual Programming Using C#: by Dr. Waheed Anwar
PDF
No ratings yet
Visual Programming Using C#: by Dr. Waheed Anwar
43 pages
The Integrated Development Environment: Microsoft Visual Basic 6.0 History of Basic
PDF
100% (1)
The Integrated Development Environment: Microsoft Visual Basic 6.0 History of Basic
18 pages
VB Notes
PDF
50% (2)
VB Notes
14 pages
Chapter 1
PDF
No ratings yet
Chapter 1
92 pages
Visual Basic
PDF
No ratings yet
Visual Basic
43 pages
Unit 3
PDF
No ratings yet
Unit 3
33 pages
MidTerm HCI
PDF
No ratings yet
MidTerm HCI
20 pages
Visual Basic Pratice Question and Answer
PDF
No ratings yet
Visual Basic Pratice Question and Answer
93 pages
2-4 Steps in Developing Application:: Visual Basic
PDF
No ratings yet
2-4 Steps in Developing Application:: Visual Basic
12 pages
AjithVisual Basic 6 0 Notes Short
PDF
100% (1)
AjithVisual Basic 6 0 Notes Short
43 pages
Bca 6 Sem Dot Net Using Asp S 2019
PDF
No ratings yet
Bca 6 Sem Dot Net Using Asp S 2019
2 pages
VB All Assignment
PDF
No ratings yet
VB All Assignment
5 pages
Visual Basic Notes
PDF
No ratings yet
Visual Basic Notes
115 pages
What Are The Three Main Differences Between Flexgrid Control and Dbgrid
PDF
No ratings yet
What Are The Three Main Differences Between Flexgrid Control and Dbgrid
22 pages
VB Program
PDF
No ratings yet
VB Program
57 pages
Data Form Wizard
PDF
100% (1)
Data Form Wizard
20 pages
Dotnet File LATEST
PDF
No ratings yet
Dotnet File LATEST
24 pages
Project 3 - Case Study Part 2 - MS Access
PDF
0% (1)
Project 3 - Case Study Part 2 - MS Access
6 pages
Controls and Form Properties
PDF
No ratings yet
Controls and Form Properties
33 pages
Bcom VB Notes
PDF
No ratings yet
Bcom VB Notes
22 pages
The Elements of Event Driven Programs
PDF
No ratings yet
The Elements of Event Driven Programs
3 pages
Assignment Bca Visual Basic
PDF
No ratings yet
Assignment Bca Visual Basic
12 pages
C++ - Array PDF
PDF
No ratings yet
C++ - Array PDF
6 pages
Visual Basic 6 (VB6)
PDF
100% (1)
Visual Basic 6 (VB6)
83 pages
To Write A Program in VB To Create A Calculator
PDF
No ratings yet
To Write A Program in VB To Create A Calculator
53 pages
Introduction C
PDF
No ratings yet
Introduction C
28 pages
Session 1 - Introduction To Visual Basic 6.0
PDF
No ratings yet
Session 1 - Introduction To Visual Basic 6.0
26 pages
Visual Basic Introduction
PDF
No ratings yet
Visual Basic Introduction
8 pages
Introduction To Data Science
PDF
No ratings yet
Introduction To Data Science
6 pages
Decision Support Systems
PDF
No ratings yet
Decision Support Systems
2 pages
Circular Queue
PDF
No ratings yet
Circular Queue
10 pages