Top Banner
3.9 to 3.15
20

3.9 to 3.15. Also refer to as Program Contains set of instructions that tells the computer how to perform specific task. Each line of code is referred.

Jan 05, 2016

Download

Documents

Phoebe Dean
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

3.9 to 3.15

Page 2: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Also refer to as Program Contains set of instructions that tells the computer

how to perform specific task. Each line of code is referred to as a statement.

Page 3: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Is a block of code that executes in response to an event. Event (User Event) – is a way in which the user can

interact with an object, such as clicking a button. Specific actions will be taken when the user clicks on the

button.

Page 4: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Container for program code. Code Editor – is the area displaying the form module

View Code button View Object button

Page 5: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Display by double-clicking on the form. Display by clicking on the View Code Button in the

Project Explorer. Clicking the button beside the view

code button returns you back to the form.

Page 6: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Removes a form from memory and ends the application.

Unload statement requires a form name to be unloaded.

If the form to be unloaded is the current form, then you could use Me

Page 7: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.
Page 8: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Select object name from Object list and then a corresponding event is selected from the Event name.

Page 9: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Indicates that the procedure cannot be accessed outside of the form module.

Sub declares the procedures End Sub – ends the Sub statement. Body is between Sub and End Sub statements.

Page 10: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

The interface and program code of an application are printed by selecting the print command from the file menu

CTRL + P

Page 11: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

File menu – Select the Remove Project command.

Page 12: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Assignment – is used to change the value of an object property at run time.

Assignment Statement changes property values using the equal sign.

Each Object property can only be assigned a valid property values.

Page 13: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Is displayed when typing an object’s name and a dot notation mark.

Page 14: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Name – Cannot be change during run time by an assignment statement

Caption – Text in double Quote• lblMessage.Caption = “Adios”

Font – has several Subproperties• Size – 0 – 2048

Example: lblMessage.Font.Size = 10• Bold & Italic are True or False

Example: lblMessage.Font.Bold = True• Name – enclosed in double quote

lblMessage.Font.Name = “Arial” Alignment – 0-left, 1 – right, 2 – center

Page 15: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Name – can not be changed during run-time through the assignment statement.

Caption – Can assigned text using double quotes. • Example: cmdCancelorDone.Caption = “Done”.

Page 16: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Name – can not be changed during run-time through the assignment statement.

Caption – Can be assigned text using double quotes. • Example: frmUserApp.Caption = “My Application”

Page 17: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Event procedures can also be written for form events. The Form_Load event procedure is executed when the

form is loaded into memory.(Application is started) Examples

Private Sub Form_Load()lblSample.Caption = “This text is centered.”lblSample.Alignment = 2End Sub

Page 18: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Changing object property values in the Form_Load event procedure is alternative to setting property values in the Properties window.

Initializing the form – Setting object properties through the Form_Load event.

Page 19: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

Comments – are used to explain and clarify program code for a human reader.

No effect on how the application runs. Single quotation mark (‘) begins a comment Mark code that is ambiguous or misleading. Example: lblSample.Alignment = 0 ‘left justify

Page 20: 3.9 to 3.15.  Also refer to as Program  Contains set of instructions that tells the computer how to perform specific task.  Each line of code is referred.

File menu – Open Project CTRL + O Open Project Button on the Tool Bar