Visual Basic Terms
IDE –The Integrated Development Environment consists of all the tools we need to create Visual
Basic programs: an Editor, a Compiler, a Debugger, an object Browser, and Context Sensitive
Help.
Object - An object is a thing a noun. It consists of code and data that work together as a unit.
Control - Object attached to a Form
• Button
• Check Box
• Combo Box
• Group Box
• Label
• List Box
• Radio Button
• Scroll Bar
• Text Box
Form - Container or windows for other forms and controls
Property - Attribute or characteristic of an object. An adjective
Setting - Current value of a property. Initial value established in property window but can be
altered using code.
Some properties:
Text - Appears in title bar of form or no the face of a Button. Also the Value displayed or typed
in a text window is stored in the Text property. (An access key can be created for a control by
inserting an & before a letter in the Text property. Pressing the Alt key and the access key can
then activate the button.) The Text property is not related to the Name property.
Name - The name used to refer to the object while writing code. Similar to a variable name.
Must begin with a letter and be no more than 40 characters long. Objects are given default names
when created. It is suggested you rename objects using standard prefixes for each control type
followed a word that describes its function.
• txtFilename
• frmLab3
• btnCalculate
BackColor – Controls the background color of a control or Form
Font – Determines the font style and size of any text printed on the control
TabStop - A Boolean property which determines whether the control can receive focus. The
Object that is active or ready for input is said to “have focus”.
TabIndex - Controls the order focus travels around the Form. The TabIndex can be set in the
Properties window or via the View/View Tab Order.
AutoSize - A Boolean property that determines if a labels size is determined by the size of the
contents of the Text property.
AcceptButton - The property of a Form used to specify which button will be activated when the
Enter key is pressed
CancelButton - The property of a Form used to specify which button will be activated when the
Cancel key is pressed.
Image - The property of a PictureBox used to specify the image to be displayed in the
PictureBox.
Object Oriented – An approach to programming that allows for defining objects, their properties
and methods. Objects can be reused.
Event Driven - A program is written to respond to actions taken by the user. The user is
somewhat in control of the order of operations.
Event - An action that is recognized by an object. Events can be triggered by the user, called
directly by the program or are triggered by code within a program.
• Click
• KeyPress
• Enter
• Load
• TextChanged
• GotFocus
• MouseHover
Event Procedure / Event Handler - Code written to respond to an event
Event Procedure Name - objectname_event
btnPrint_click()
txtUserinput_change()
Code - Instructions
• Declaration statements (reserve memory for instance of variable or procedures)
Variable - A named area of memory used to store one value at a time.
Data type - Determines the kind of data (String, Integer, Long, Decimal, Single, Double) that can
be stored in a variable
Dim decGrossPay As Decimal
• Executable statements (perform an action, Assignment statements, procedure/method
calls)
Format : [Link] = setting
or
VariableName = constant, variable, or expression
[Link] = “”
[Link] = True
decGrossPay = decHoursWorked * decPayRate
Operator - Usually symbols, indicates the action to be applied to operands in an expression.
( ) * / \ mod + - & = += *= -=
Constants - Values that cannot change, may be numeric or string
6.5 "Parkland College" 34d
Reserved / Key Words - Words that have special meaning to a computer language
End, Public, Sub
Class – A template for an object. A description of an object of that class., its initial property
settings and any methods/procedures associated with the class.
Method - A procedure that is connected to an object , an action an object is capable of
performing, a verb.
Format: [Link]
'Causes focus to go to the textbox named txtNumHours
[Link]
'Clears the contents displayed in the textbox named [Link]
'Highlights the Text displayed in the textbox named txtHourlyRate
[Link]
'Explicitly casts the value passed to it to an Integer data type. (passed value MUST be numeric)
xxxxx = Convert.ToInt32(xxxx)
Syntax Error – Violation of the rules of the language
Syntax is language specific, different for different languages
Run Time Error / Unhandled Exception
When a statement is syntactically correct but causes a fatal error when the computer attempts to
execute it an Exception occurs.
Logic Error - When the program does exactly what you tell it to but not what you want it to a
logic error has occurred
Debugging - The process of finding and fixing errors / bugs in a program