CMPT 110 Chapter Notes - Chapter 1-6: Integrated Development Environment, List Box, Intelligent Code Completion

97 views8 pages
Unit 1
Flowcharts: Graphically depict the logical steps to carry out a task and show how the steps relate to each
Flowline: used to connect symbols and indicate the flow of logic
Terminal: used to represent start and end
Input / Output: used to display input and output operations
Processing: used for arithmetic and data manipulation operations
Decision: used for questions or making decisions
Connector: used to join different flowlines
Pseudocode: Uses English-like phrases with some Visual Basic terms to outline the task.
Hierarchy charts: Show how the different parts of a program relate to each other.
Unit 2
Form: Windows Style Screen with boxes in which users type and edit information and add controls
Controls: refers to boxes and buttons
Integrated Development Environment (IDE): referred to Visual Basic Programming environment
Menu Bar: displays the menus of commands ex. File, Edit, View, Window
Tool Bar: holds a collection of buttons that carry out standard operations when clicked
Document Window: holds the rectangular form window
Properties Window: used to change the appearance and behavior of objects on the form
Solution Explorer: displays the files associated with the program and provides access to the commands
Toolbox: holds icons representing objects that can be placed on the form
Text boxes: used to get information (input) or display information (output)
Labels: tells the user what type of information is displayed in the textbox
Buttons: user clicks on a button to initiate an action
List Boxes: used to display output
Tasks button: used to set the Multiline property of the textbox
Sizing Handles: used to resize an object
Text Property: determines the words displayed in the textbox
ForeColor Property: determines the color of the text displayed in the text box
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 8 pages and 3 million more documents.

Already have an account? Log in
Font Property: gives font name, style and size of the font
Read only property: prevents the user from initiating any action on that particular object
If you insert an ampersand (&) before the first letter of the text in a button, it will underline the first
letter of the text. This enables the user to press Alt+P to cause the even to occur that would occur when
a button is clicked.
Proximity lines: short line segments that help you place controls a comfortable distance from each other
from the sides of the form
Snap lines: horizontal and vertical line segments that help you align controls
To align and resize the objects together, go to Format and click options there
-Make Same Size: Equalize the width and/or height
-Center in Form: Center horizontally or vertically
-Vertical Spacing: Equalize vertical spacing between controls
-Horizontal Spacing: Equalize horizontal spacing between controls
Back Color: specifies the background color for the form or control
Visible: disabling this causes an object to disappear when program runs
Enabled: disabling this grays out the control and cannot receive the focus
Event driven programming language: programs are written to respond to actions taken in a windows
Object oriented programming language: programs are written to create and manipulate virtual
representations of real-world collections of objects
Unit 3
Event: clicking or pressing a key to initiate an action
1) Create interface 2) Set properties 3) Write code
Intellisense: autocompletion system that helps prevents errors
Code is written as = setting
Assignment statements: assign values to properties
The statements to be executed when an event occurs are written in a block of code called event
procedure or event handler
First line of the event procedure is called the header and it’s always written as:
Private Sub objectName_event(sender As System.Object, e As System.EventArgs) Handles
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 8 pages and 3 million more documents.

Already have an account? Log in
End Sub
Reserved or key words: Private, Sub, As Handles, End
The two statements above are the body of the event procedure
Expression following Handles identifies the object and the event happening to the object
Private indicates that event procedure cannot be invoked by another form
Sub = Subroutine
The form is referred to by the keyword Me.
Me.Text = “Demonstration”
An event procedure can handle more than one event
Private Sub ButtonPushed(…) Handles btOne.Click, btnTwo.Click
Statements are indented by two spaces inside procedures
Three identifiable events: Click, GotFocus, and LostFocus
Method: a single entity encapsulating a sequence of programming statements
GotFocus and LostFocus are methods that are applicable to both TextBox and Button objects whereas
Click method is only applicable for the Button method
Writing a program:
1) Requirements Analysis
2) Construct user interface form
3) Identify required events
4) Complete the templates
Unit 4
Numeric Literals: numbers
Five standard arithmetic operations in VB are addition(+), subtraction(-), multiplication(*), division(/)
and exponentiation(^)
Display number in a list box: lstBox.Items.Add(n); Add is called a method
lstBox.Items.Clear() removes all the items in list box; Clear is another method
Variables: something that holds value; a name that is used to refer to an item of data
Camel Casing: variable names are written in lowercase letters except for the first letter of each
additional word ex. gradeOnFirstExam
var = n ; assignment statement
Unlock document

This preview shows pages 1-3 of the document.
Unlock all 8 pages and 3 million more documents.

Already have an account? Log in

Get access

$10 USD/m
Billed $120 USD annually
Homework Help
Class Notes
Textbook Notes
40 Verified Answers
Study Guides
1 Booster Class
$8 USD/m
Billed $96 USD annually
Homework Help
Class Notes
Textbook Notes
30 Verified Answers
Study Guides
1 Booster Class