Download presentation
Presentation is loading. Please wait.
Published byPhoebe Dean Modified over 9 years ago
1
3.9 to 3.15
2
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.
3
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.
4
Container for program code. Code Editor – is the area displaying the form module View Code buttonView Object button
5
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.
6
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
8
Select object name from Object list and then a corresponding event is selected from the Event name.
9
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.
10
The interface and program code of an application are printed by selecting the print command from the file menu CTRL + P
11
File menu – Select the Remove Project command.
12
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.
13
Is displayed when typing an object’s name and a dot notation mark.
14
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
15
Name – can not be changed during run-time through the assignment statement. Caption – Can assigned text using double quotes. Example: cmdCancelorDone.Caption = “Done”.
16
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”
17
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 = 2 End Sub
18
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.
19
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
20
File menu – Open Project CTRL + O Open Project Button on the Tool Bar
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.