3.9 to 3.15. Also refer to as Program Contains set of instructions that tells the computer how to...
-
Upload
phoebe-dean -
Category
Documents
-
view
212 -
download
0
Transcript of 3.9 to 3.15. Also refer to as Program Contains set of instructions that tells the computer how to...
![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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/1.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/2.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/3.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/4.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/5.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/6.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/7.jpg)
![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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/8.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/9.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/10.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/11.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/12.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/13.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/14.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/15.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/16.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/17.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/18.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/19.jpg)
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.](https://reader036.fdocuments.us/reader036/viewer/2022070404/56649f395503460f94c563b8/html5/thumbnails/20.jpg)
File menu – Open Project CTRL + O Open Project Button on the Tool Bar