You are on page 1of 37

1

Module I. Week 1 and 2


Lesson 1: History of Programming
Lesson Objectives
At the end of the lesson, you should be able to:
A. Define programming.
B. Explain the history of programming.
C. State the importance of programming in your life.

Day 1
LET’S EXPLORE
Below is an AD questionnaire. Write A if you agree and D if you disagree.
___1. Codes was introduced by Babylonians.
___2. Writing computer programs are creating orders that will make the computer follow and
run.
___3. The role of computer programming language can be described as technological and
conceptual.
___4. 1 bit is the smallest unit of information in a computer.
___5. A programming language is an artificial language designed to communicate instructions
to a machine, particularly a computer.

Day 2 -4
LET’S EXPLAIN

Key points (Open your book on page 2-3 for full discussion)
Computer programming - the process of designing, writing, testing,
debugging/troubleshooting and maintaining the source code of computer programs.
Computer programmer - the person who develops and writes codes to the compilers and
converts it to a machine language called binary.
Binary - composed of bits. (1bit is the smallest unit of information in a computer)
Programming language - an artificial language designed to communicate instructions to
a machine, particularly a computer.
Role of programming language:
1. Technical - for constructing a computer to perform tasks.
2. Conceptual - a framework within which we organize our ideas about things and processes.
**For the detailed history of programming language, read your textbook on page 2-11. Take note on the key
terms about programming and its history.
History of Programming Language
 FORTRAN - 1953  LOGO - 1967  ADA - 1977
 Math-Matics - 1957  Pascal - 1968  C++ - 1979
 Cobol - 1959  C - 1969  Visual Basic - 1991
 Basic - 1964  SQL - 1970  Java - 1995

LET’S DEEPEN
In a separate sheet of bond paper, make a flowchart containing the history of programming.
Refer to the rubric below.
2

Indicators 5 4 3 2 1
The events in the flowchart/timeline is systematic.
The design is eye-catching and neat.
The contents in the flowchart/timeline are all facts.
The content is relevant to the topic.

Day 3
LET’S WRAP UP
Write a short summary on what you’ve learned about programming and its history. Refer on
the rubric below the box.

Indicators 5 4 3 2 1
The summary
contains the
topics within
the lesson
only.
The summary
is relevant to
the topic.
The summary
is well
presented.
3

Day 4
LET’S EVALUATE
Below is an AD questionnaire. Write T if you agree and F if you disagree.
___1. Codes was introduced by Babylonians.
___2. Writing computer programs are creating orders that will make the computer follow and
run.
___3. The role of computer programming language can be described as technological and
conceptual.
___4. 1 bit is the smallest unit of information in a computer.
___5. A programming language is an artificial language designed to communicate instructions
to a machine, particularly a computer.
___6. Ada Lovelace is the First lady programmer to translate Menabrea’s paper into English.
___7. The Babylonian counting system is developed in Mesopotamia.
___8. Charles Babbage s the father of computer who invented the Analytical engine.
___9. Visual Basic is designed by James Gosling.
___10. Pascal was created by Blaise Pascal.

Module I. Week 3
Lesson 3: Levels of Programming Language
Lesson Objectives
At the end of the lesson, you should be able to:
a. Define and explain the levels of programming language.
b. Make a flowchart containing the levels of programming language.
4

c. State the importance of the evolution of programming language in your


life.

DAY 1
LET’S EXPLORE

Last time, we discussed on the introduction and history of programming. Now, let’s
move on to the levels of programming language. Answer the activity below.
Activity 1. Direction: Below is an AD questionnaire. Write A if you agree and D if you disagree.
___1. Language has its own evolution to make communication easier.
___2. The first generation language was introduced by Jhon Atanasoft.
___3. The second generation language also known as the assembly language.
___4. Fifth generation language solve problems using constraints rather than algorithms, used
in Artificial Intelligence.
___5. A fourth generation language may also contain DBMS or Data Base Management
System.

LET’S EXPLAIN

For full discussion, read pages 11-18. Take note or highlight the important details.
Generations of Programming Language
 Computers and Machines and they can only understand instructions which are in
Machine Language.
 Computer language has paralleled to human language evolution in that it has
branched out into many froms which existed today.
First Generation Language
 Fast and efficient, executed directly on the CPU
 Consists only of 0s and 1s
 Difficult for humans to read, write and debug
Second Generation Language
 Simple mnemonic instructions <opcode><operands>
 Assembler translates into machine code
 Handcoding in assembly only for low-level needs
Third Generation Language
 Easier for humans to read, write and debug
 Compiler translates into machine code before running
 Interpreter translates into machine code at runtime
Fourth Generation Language
 Much easier for humans to read, write and debug
 Compiler translates into machine code before running
 Interpreter translates into machine code at runtime
 Supports standard API which are commonly used to create a Decent Programming
Interface, and has capability to create a large record of Database and access it over a
network by the use Of Query
Fifth Generation Language
 Solve problems using constraints rather than algorithms, used in artificial intelligence
 Designed to make the computer solve a given problem without the programmer

DAY 2 and 3
5

LET’S DEEPEN
In a separate sheet of bond paper, make a flowchart which shows the evolution of
programming language. Use your creativity. You will be graded based on the rubrics below.
Indicators 5 4 3 2 1

The contents are systematic and clearly stated.

The flowchart has an excellent design.

The design and content of the flowchart is relevant to the given topic.

The flowchart is done neatly.

DAY 4
LET’S EVALUATE
Instruction: State the importance of the evolution of programming language in your life.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
Module I. Week 4
Lesson 4: Program and its Life Cycle
Lesson Objectives
At the end of the lesson, you should be able to:
a. Explain the program and its life cycle.
b. Make a timeline showing the program and its life cycle
c. State the importance of the program and its life cycle.
6

DAY 1
LET’S EXPLORE
Last time, we studied about the levels of programming languages. Now, we move on to
program and its life cycle. Let’s start!
Activity 1. Direction: Fill the flowchart with the choices inside the box.

Planning the Method of Solution Documentation


Coding Understanding the Problem
Development of Methods Program testing and
debugging

1. 2. 3.

6. 5. 4.

DAY 2
LET’S EXPLAIN

Program and its Life Cycle


1. Understanding the Problem - the programmer should understand the problem thoroughly in
terms of requirements.
2. Planning the Method of Solution - once the problem is being understood, the method should
now be planned depending on the size of the task. It may be shared amongst many
programmers.
3. Development of Methods using Algorithms and Flowcharts - algorithm is a problem solving
technique while flowchart is a pictorial representation of an algorithm is called flowchart.
4. Coding the Instruction in a Programming Language - as you design the solution, we have to
choose a programming language depending upon the type of application and codes
statements to implement our algorithm.
5. Program Testing and Debugging - the process of correcting errors in sequencing or
entering the codes.
6. Documentation - it includes a statement of the problem and details of the pogram

DAY 3
LET’S CREATE
Create a timeline chart containing the process of program’s life cycle. Refer to the
rubric below: Use a separate sheet of bond paper for this activity.
Indicators 5 4 3 2 1
The timeline
chart is
7

systematic.
The content and
supporting
details of the
chart is based
on facts.
The design of
the timeline
chart is crafted
with creativity.
Legend:
5 - Excellent
4 - Very Satisfactory
3 - Satisfactory
2 - Fairly Satisfactory
1 - Poor

DAY 4
LET’S DEEPEN
In a 5-10 word paragraph, write the importance of program’s life cycle in the whole
programming process.

Module I. Week 5
Lesson 5: Flow Charting
Lesson Objectives
At the end of the lesson, you should be able to:
a. Define flowchart.
b. Identify the symbols, shapes, names, uses and examples of a flowchart.
c. Draw the different symbols of a flowchart.
8

DAY 1
LET’S EXPLORE
Direction: Name the flowchart symbols. Choose from the choices below. Write your answers in
the space provided.

DAY 2
LET’S EXPLAIN
For full discussion, read your book on page 21-22.

Flowchart - a graphical or symbolic representation of a process.

Name Uses
Terminal symbol Used at the beginning and end of each flowchart
Memory Create a temporary storage and will be accessible
9

if needed
Process Used to show calculations and other processes
that takes place within a program
Input/output Shows when information comes into a program
Decision Used to show that the program must decide
whether something is true or false.
On page connector Used to indicate when flowchart continues on
another page
Connector symbol Used to break a flowchart that will be continued
elsewhere.
Direction Shows the flow of the program
Annotation Used to describe actions or variables.
DAY 3 and 4
LET’S CREATE
Direction: Draw the different symbols of a flowchart and put examples. Put it the box below.

Module I. Week 6
Lesson 6: Visual Basic
Lesson Objectives
At the end of the lesson, you should be able to:
a. Define visual basic.
b. Explain the history of visual basic.
c. Enumerate and explain the advantages of visual basic.
DAY 1 and 2
10

LET’S EXPLORE
Below is an AD questionnaire. Write A if you agree and D if you disagree.
___1. Visual Basics is a fourth generation event-driven programming language.
___2. Visual basics 4.0 is the first version that could create 32-bit as well as 16-bit Windows
program.
___3. With version 5.0 is released Visual Basic exclusively for 32-bit versions of windows.
___4. One of the advantages of visual basics is that it provides a comprehensive, interactive
and context-sensitive online help system.
___5. COM components cannot be written in different languages.

LET’S EXPLAIN
**Open your book on page 44-47 for full discussion.

Key Points
 Visual Basic (Beginner’s All-purpose Symbolic Instruction Code) is a third generation
event-driven programming language and Integrated Development Environment (IDE) from
Microsoft for its COM programming model.
History of Visual Basic
 Visual Basic 1.0 for DOS - 1992
 Visual Basic 2.0 - 1992
 Visual Basic 3.0 - 1993
 Visual Basic 4.0 - 1995
 Visual Basic 5.0 - 1997
 Visual Basic 6.0 - 1998
Advantages of Visual Basic
 The structure of the Basic programming language is very simple, particularly as to the
executable code.
 VB is not only a language but primarily an integrated, interactive development
environment (IDE).
 The VB-IDE has been highly optimized to support rapid application development (RAD). It
is particularly easy to develop GUI and to connect them to handler function provided by
the application.
 The GUI of the VB-IDE provides intuitively appealing views for the management of the
program structure in the large and the various types of entities (classes, modules,
procedures, forms, etc.).
 VB provides a comprehensive, interactive and context-sensitive online help system.
 When editing program texts, the “IntelliSense” technology informs you in a little pop-up
window about the types of constructs that may be entered at the current cursor location.
 VB is a component integration language which is attuned to Microsoft Component Object
Model (COM).
 COM components can be written in different languages.
 Interfaces of COM components can be easily called remotely via Distributed COM
(DCOM), which makes it easy to construct distributed applications.
 COM components can be embedded in/linked to your application’s user interface and
also in/to stored documents (Object Linking and Embedding (OLE), Compound
Documents).

DAY 3 and 4
11

LET’S CREATE
Direction: Create a timeline chart containing the history of VB. Put your answer in a
separate sheet of bond paper and attach it properly on your modules. Refer to the rubrics
below.\
Indicators 5 4 3 2 1
The events in the flowchart/timeline is systematic.
The design is eye-catching and neat.
The contents in the flowchart/timeline are all facts.
The content is relevant to the topic.
Legend:
5 - Excellent
4 - Very Satisfactory
3 - Satisfactory
2 - Fairly Satisfactory
1 - Poor

LET’S EVALUATE
Direction: Choose 2 advantages of Visual Basic and explain it briefly. Limit your answers
in 3-5 sentences only.

Module 2. Week 1
Lesson 1. The Visual Basic 6.0
Lesson Objectives
At the end of the lesson, you should be able to:
a. Explain the different parts of VB environment.
b. Create a summary on how the parts of VB works.
c. State the importance of the parts of VB in managing your applications.
12

DAY 1 and 2
LET’S EXPLORE
Our last topic was all about the history of visual basic. Now we move on to the different
parts of visual basic environment. Let’s start!
Direction: Write A if you agree with the statement and D if you disagree.
___1. The default environment is made up of 6 windows.
___2. The title bar runs horizontally across an application window.
___3. The menu bar is the line that lies across the top the VB toolbar.
___4. The project window displays a list of all forms and elements making up your application.
___5. The form window is the central to developing VB applications.
LET’S EXPLAIN
For full discussion, read your book on pages 48-61.
The Default Environment
The Main Window
The title bar runs horizontally across an application window.
The menu bar is the line of text that lies across the top of the visual basic toolbar.
1. File menu - create, open, print and save projects
2. Edit menu - perform the standard clipboard option
3. View menu - view various components and tools
4. Project menu - add to or remove forms, codes, elements, user controls and
property pages.
5. Debugg menu = stop or start applications, set watches and break points and
perform other tasks to help monitor your application’s progress.
6. Run menu - start or stop your apps as well as break in the middle of the
program execution and the resume.
7. Query menu - simplify the creation of SQL series
8. Diagram menu - used for building database applications.
9. Tools menu - add procedure and set up procedure properties
10. Add-in manager - allows to select other add-in utilities to be added to the add-
ins menu.
11. Window menu - gives you options tile and cascade windows within the VB
environment
12. Help menu - connects users to its manual and technical support.
Tool bar - control the whole visual basic environment from the menu bar
Application window - central to developing VB apps.
Toolbox window - first window you’ll become familiar with
Properties window - lists all the properties of the object
Form layout window - shows how a given form will be displayed when program runs
Project window - displays a list of all elements and forms making up your app
Form designer - designs your app’s user interface

DAY 3-4
LET’S CREATE
Direction: Create a summary on how the parts of visual basic works.
Guide questions: What are the parts of VB? What are their functions? What is the importance
of the parts of VB in managing your applications?
___________________________________________________________________________
___________________________________________________________________________
13

___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
____________________________________________________________

Module 2. Week 2
Lesson 2. Developing a Visual Basic Program
Lesson Objectives
At the end of the lesson, you should be able to:
a. Explain the process of developing a VB program.
b. Write an essay on how to create a program.
c. State the importance of developing a Visual Basic Program.
14

DAY 1 and 2
LET’S EXPLORE
Our last topic was all about the different parts of visual basic environment. Now, let’s
move on to the processes involved in developing a program Let’s start!
Direction: Arrange the following processes systematically. Write the number (1 as the first) of
the correct answer in the blank.
___My First Application
___Making your program stand alone
___Restore a saved program
___Save the project
___Saving and restore project
___Naming a form and project
___Managing you files

LET’S EXPLAIN
**For full discussion, read your book on pages 69-84.
Building a program
1. Managing your files - Select start>Documents. Then right click and select new>folder.
Lastly, rename it with “Visual Basic Project” and click the close button.
2. My first application - Open VB 6.0 from your start menu and wait until program
loads. In the new project dialog, select standard EXE and click the open button. This
will bring up your new project 1 app with Form1 visible.
3. Naming a form and project - select project > Project1 Properties. In the project
properties dialog box, change project 1 to your chosen project name.
4. Saving and restore project - you should always name and save your the form before
you save the project. Select file> Save MyApplication As.
5. Save the project - Be sure to name and save the form before you save the project.
6. Restore a saved program - First, start VB and then open the form. An icon for a
folder of forms appears in the project windows. You can use File>Save MyApplication
and file > save project to save the changes.
7. Making your program stand alone - it is a computer program that does not load any
external module, library function or program and that was designed to boot with the
bootstrap procedure of the target processor.

DAY 3-4
LET’S CREATE
Direction: Following the process on how to build a program, write an essay on how you want to
create your own program. You indicate the name of your own program.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
15

___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
____________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
_______________

Module 2. Week 3
Lesson 2. Working on Object or Control Properties
Lesson Objectives
At the end of the lesson, you should be able to:
a. Identify Object or Control in Visual Basic.
b. Familiarize oneself with Visual Basic Objects or Controls.
c. Identify the function of each common Object or Controls in Visual Basic.
16

DAY 1 and 2
LET’S EXPLORE
Last time, we have discussed on how to develop a Visual Basic program. Now, we move
on to working with Objects and Controls.
Direction: Write A if you agree with the statement and D if you disagree.
___1. Name is the string value used to refer to the control in code.
___2. Left specifies the graphic to be displayed in the control.
___3. The prefix for Picture Clip is “pic”.
___4. The prefix for Command Button is “cmd”.
___5. Tag is a string containing extra data associate with the control.

LET’S EXPLAIN
For full discussion, read your book on page 87-92.
 Object or Controls - it includes Label, Textbox, and Command Button controls that are
used in nearly every application.
Property - an attribute of an object that defines one of the object’s characteristics.
1. Appearance - specifies whether an object’s border appears flat or with a 3D look.
2. Align or Alignment - For controls displaying text and it specifies the alignment of the text.
3. BackColor - specifies the background color of the control
4. BorderStyle - specifies whether or not a control has a border.
5. Caption or Text - the string text that is to be displayed in the control
6. Enabled - determines whether or not the control can respond to user-generated events
7. Font - specifies the font to be applied in the displayed text
8. ForeColor - specifies the color of text or graphics to be displayed in the control.
9. Height - specifies the height of the control
10. Index - specifies the element number of a control if the control is a member of a control
array.
11. Left - specifies the distance between the internal left edge of a control and the left edge of
its container.
12. Name - the string value used to refer to the control in code
13. Picture - specifies the graphic to be displayed in the control.
14. TabIndex - specifies tab order of a control within its parent form
15. TabStop - specifies whether or not the user can use the Tab key to give focus to the
control
16. Tag - a string containing extra data associated with the control
17. ToolTipText - specifies text to be displayed when the mouse is paused over the control
18. Top - specifies the distance between the internal top edge of a control and the top edge of
its container.
19. Visible - specifies whether the control is visible or hidden
20. Width - specifies the width of the control

DAY 3
LET’S CREATE
In a separate sheet of bond paper, create a concept that involves the Objects or Controls
Properties with their functions. Refer to the rubric below:
Indicators 5 4 3 2 1
17

The contents are systematic and clearly stated.

The concept has an excellent design.

The design and content of the concept map is relevant to the given topic.

The concept map is done neatly.

DAY 4
LET’S EVALUATE
Direction: Enumerate 10 properties of Object or Control and state its functions. Put your
answers in the space below.

Module 2. Week 4
Lesson 4. Creating Object or Control
Lesson Objectives
At the end of the lesson, you should be able to:
a. Explain the process of creating Object or Control.
b. Familiarize oneself with creating Object or Control.
c. Create a flowchart which consist the process of creating Object or
Control.
DAY 1 and 2
18

LET’S EXPLORE
Last time, we have discussed on how to work with Objects and Controls. Now, let us
study about the process of creating Object or Control. Let’s start!
Direction: Write A if you agree with the statement and D if you disagree.
___1. Modify the form properties by selecting the form and got the property window.
___2. The best practice in managing your program is to create a specific folder that matches
the name of your program.
___3. You have to select “Standard TXT” to create a new project.
___4. You need 3 labels to work on your program.
___5. Label, textbox and command button are the essential controls in creating a program.

LET’S EXPLAIN
For full discussion, read your book on pages 94-98.
Sample Program
**Follow the step-by-step process in building program that adds two numbers together.
1. Select “Standard EXE” from the opening dialog. At this point, VB has started a new project
for you.
2. On the Menu Bar, select Project>Project 1 properties. On the Project Name: text box type
“AddingTwoNumbers” then click Ok.
3. Modify the form properties by selecting the form and got the property windows.
4. Modify the property Name: “AddingNumbers”.
5. Modify the property caption: “AddingNumbers”
6. On the Menu Bar, select File>Save MyApplication.frm As.
7. In the Save in, locate the directory you created from:
8. Libraries /Document/ Visual Basic Project/ Adding two numbers
9. Click Save. Then on the Menu bar, select File>Save Project As. Then click Save again.
10. The three basic VB controls are the label, textbox and command button.These are the
controls needed for the program.
11. Insert 3 labels by clicking Label from the toolbox.
12. Arrange the labels accordingly by dragging into the right position.
13. Insert 3 Text box by Clicking the Text box from the tool box.
14. Arrange the Text box accordingly by dragging into the right position.
15. Insert three Button by clicking the Button from the toolbox.
16. Arrange the Button accordingly by dragging into the right position.
17. Set the name and caption accordingly inside the property window.

DAY 3 AND 4
LET’S CREATE
In a separate sheet of bond paper, create a FLOWCHART that contains the process of
creating Object or Control. Refer to the rubrics below:
Indicators 5 4 3 2 1

The contents are systematic and clearly stated.

The flowchart has an excellent design.


19

The design and content of the flowchart is relevant to the given topic.

The flowchart is done neatly.

Module 2. Week 5
Lesson 4. Setting form, report, and control properties in Visual Basic
Lesson Objectives
At the end of the lesson, you should be able to:
a. Explain how to set form, report and control properties in VB.
b. Familiarize oneself with setting for, report and control properties.
c. Create a summary on how to set form, report and control properties.
DAY 1 and 2
20

LET’S EXPLORE
Last time, we have discussed about the process of creating Object or Control. Now let us
move on to setting form, report and control properties in VB. Let’s start!
Direction: Write A if you agree with the statement and D if you disagree
___1. You can set properties for these objects from within a Sub, Function, or event
procedure.
___2. Code that uses the Me property executes faster than code that uses a fully qualified
object name.
___3. You can refer to the Controls collection either implicitly or explicitly, but the code
executes faster if you use an implicit reference.
___4. Refer to the control in the Controls collection of the Form or Report object on which it
resides. 
___5. You can use the following code to toggle the Visible property of a text box

LET’S EXPLAIN
This lecture is not in your book so please copy the important points. You can also access
it online with this link: https://docs.microsoft.com/en-us/office/vba/access/concepts/settings/
set-form-report-and-control-properties-in-visual-basic
 Form, Report, and Control objects are Microsoft Access objects. You can set properties
for these objects from within a Sub, Function, or event procedure. You can also set
properties for form and report sections.
 Set a property of a form or report
**Refer to the individual form or report within the Forms or Reports collection, followed by the
name of the property and its value. For example, to set the Visible property of the Customers
form to True (-1), use the following line of code:
Forms!Customers.Visible = True
 You can also set a property of a form or report from within the object's module by using
the object's Me property. Code that uses the Me property executes faster than code that
uses a fully qualified object name. For example, to set the RecordSource property of the
Customers form to an SQL statement that returns all records with a CompanyName field
entry beginning with "A" from within the Customers form module, use the following line of
code:
Me.RecordSource = "SELECT * FROM Customers " _ & "WHERE CompanyName Like 'A*'"
 Set a property of a control
**Refer to the control in the Controls collection of the Form or Report object on which it
resides. You can refer to the Controls collection either implicitly or explicitly, but the code
executes faster if you use an implicit reference. The following examples set
the Visible property of a text box called CustomerID on the Customers form:
' Faster method.
Me!CustomerID.Visible = True
' Slower method.
Forms!Customers.Controls!CustomerID.Visible = True
 The fastest way to set a property of a control is from within an object's module by using
the object's Me property. For example, you can use the following code to toggle
the Visible property of a text box called CustomerID on the Customers form:
With Me!CustomerID
.Visible = Not .Visible
End With
21

 Set a property of a form or report section


**Refer to the form or report within the Forms or Reports collection, followed by
the Section property and the integer or constant that identifies the section. The following
examples set the Visible property of the page header section of the Customers form to False:
Forms!Customers.Section(3).Visible = False
Me!Section(acPageHeader).Visible = False

DAY 3 AND 4
LET’S CREATE
Direction: Create a summary containing the process on how to Setting form, report, and
control properties in Visual Basic.
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___

Module 3. Week 1
Lesson 1. Variables
Lesson Objectives
At the end of the lesson, you should be able to:
a. Explain the use of different variables.
b. Identify the types of variables.
c. State the importance of variables in programming.
22

DAY 1 and 2
LET’S EXPLORE AND EXPLAIN
On the previous chapter, we have discussed how to set form in visual basic. Now, let’s
move on to variables and its uses. Let’s start! Indicate the proper name of the operations
below and after this lesson, check if your answers are correct. If it is wrong, take note and
learn from it.
___1. /
___2. ^
___3. Mod
___4. &
___5. *

LET’S EXPLAIN
For full discussion, read your book on pages 147-173.
Variable - holds data inside of it such as number string or integer. There are two types of data:
Numerical and Non-Numerical
Numeric data - consist numbers which can be computed mathematically with various standard
operators such as add, minus, multiply, divide and so on.
Examples:
Byte - store integer values in the range of 0-255
Integer - store integer values in the range of -32,768 - +32,767
Long - store integer values in the range of -2,147,483,468 - +2,147,483,468

Single - store floating point value in the range of


Double - store large floating value which exceeding the single data type value.
Currency - store monetary values. It supports 4 digits to the right of decimal Point and 15
digits.
Non-numeric data - data types that cannot be manipulated mathematically using standard
arithmetic operators.
String - used to store alphanumeric values. A variable length string can store approximately 4
billion characters.
Date - used to store date and time values.
Boolean - data types hold either a true or false value.
Variant - stores any type of data and is the default Visual Basic data type.
Types of Operations
 Arithmetical Operators
 Relational Operators
 Logical Operators

Name:______________________________________Section:_________________________
Date Submitted:________________________
DAY 3 AND 4
LET’S EVALUATE
Activity 1. Identify the following term being described and write your answer on the space
provided.
________________1. The type of data that consist of number which can be computed
mathematically.
23

________________2. The type of data that cannot be manipulated mathematically using


standard arithmetic operators.
________________3. It is used to store alphanumeric values.
________________4. It is used to store date and time values.
________________5. It is the type of data that holds either a true or false value.
________________6. It stores any type of data and is the default VB type.
________________7. It is a variable that was declared inside a procedure.
________________8. It is a variable that can be access in every scope of the program.
________________9. It is a special symbol which indicates a certain process is carried out.
________________10. It allows us to change the value of a variable.

Activity 2.
What is the importance of variables in programming?
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
______________________________________________

Module 3. Week 2, 3 and 4


Lesson 2. Conditional Statements
Lesson Objectives
At the end of the lesson, you should be able to:
24

a. Identify the different types of conditional statements.


b. Create your own conditional statement.
c. State the importance of conditional statement in programming.
DAY 1 and 2
LET’S EXPLORE
On the previous chapter, we have discussed about variables. Now, let us move on to the
conditional statements. Let’s start! Write T if the statement is true and F if it is false. After this
lesson, check if your answers are correct. If it is wrong, take note and learn from it.
___1. The conditional statement is any expression that returns a True or False result.
___2. The conditional might be a Boolean variable.
___3. The if then statements tell your program to execute a certain section.
___4. Select…Case statement is used for statements to select one of many blocks of codes.
___5. The if…then statements is the most basic of all the control flow statements.

LET’S EXPLAIN
For full discussion open your book and read pages177-190.
 Conditional statement - any expression that returns a True or False result. There it might
be a Boolean variable, a control that equates to a True or False value, or a longer
expression that includes conditional and possibly one or more logical operators.
 If then statements - tells your program to execute a certain section of code only if a
particular test evaluates to true
Structure: If condition Then
Statement
End If
 If…Then…Else statement - use this to execute some code if the condition is true and
another code if the condition is false.
Structure: If condition Then
statements
Else
statements
End if
 If…else…if…else statement - use this statement to select one of many blocks of code to
be executed
Structure: If condition 1 Then
Statements
ElseIf condition 2 Then
Statements
ElseIf condition 3 Then
Statements
Else
Statements
EndIf
 Select…Case statement - use this statement to select one of many blocks of code to be
executed
Structure: Select Case Index
Case 0
Statements
Case 1
25

Statements
End select

ANSWER SHEET

DAY 2 AND 3
LET’S CREATE
1. Create your own conditional statement structure. Identify the type of
conditional statement you used. Put your answer in the box below.

2. What is the importance of conditional statements in programming?


___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
______________________________________________
___________________________________________________________________________
______________

3. Create a conditional statement in your visual basic app. The instruction and the
tutorial on how to use Conditional Statements in VB will be sent in your GC .
Module 3. Week 5
Lesson 5. Creating a New Project
Lesson Objectives
At the end of the lesson, you should be able to:
a. Identify the steps in creating a program.
26

b. Create a timeline chart that shows the steps in creating a program.


c. State the significance of knowing how to create application project in your
life.

WHAT IS IT?
1: Building Your First Web Application Project
The steps below are walks-through on how to create, build and run your first web app using
VB and the ASP.NET Web Application Project support in VS 2005.

Creating a New Project


Select File->New Project within the Visual Studio 2005 IDE. This will bring up the New Project
dialog. Click on the “Visual Basic” node in the tree-view on the left hand side of the dialog box
and choose the "ASP.NET Web Application" icon:

Visual Studio will then create and open a new web project within the solution explorer. By
default it will have a single page (Default.aspx) as well as a web.config file. All project file-
meta-data is stored within a MSBuild based project file.

Opening and Editing the Page


Double click on the Default.aspx page in the solution explorer to open and edit the page. You
can do this using either the HTML source editor or the design-view. Add a "Hello world" header
to the page, along with a calendar server control and a label control (we'll use these in a later
tutorial):
27

Build and Run the Project


Hit F5 to build and run the project in debug mode. By default, ASP.NET Web Application
projects are configured to use the built-in VS web-server (aka Cassini) when run. The default
project templates will run on a random port as a root site (example: http://localhost:12345/):

You can end the debug session by closing the browser window, or by choosing the Debug-
>Stop Debugging (Shift-F5) menu item.

Looking under the covers

When you compile/build ASP.NET Web Application projects, all code-behind code, embedded
resources, and standalone class files are compiled into a single assembly that is built in the \
bin sub-directory underneath the project root (note: you can optionally change the location if
you want to - for example, to build it into a parent application directory).

If you choose the "Show All Files" button in the solution explorer, you can see what the result
of our compilation output looks like:
28

This works exactly the same as with Visual Studio 2003 ASP.NET Web Application Projects

Customizing Project Properties

ASP.NET Web Application Projects share the same configuration settings and behaviors as
standard VS 2005 class library projects. You access these configuration settings by double-
clicking on the "My Project" node in the Solution Explorer with VB projects in VS 2005. This will
then bring up the project properties configuration editor. You can use this to change the name
of the generated assembly, the build compilation settings of the project, its references, its
resource string values, code-signing settings, etc:

ASP.NET Web Application Projects also add a new tab called "Web" to the project properties
list. Developers use this tab to configure how a web project is run and debugged. By default,
ASP.NET Web Application Projects are configured to launch and run using the built-in VS Web
Server (aka Cassini) on a random port of the machine.

This port number can be changed if this port is already in use, or if you want to specifically test
and run using a different number:
29

Alternatively, Visual Studio can connect and debug IIS when running the web application. To
use IIS instead, select the "Use IIS Web Server" option and enter the url of the application to
launch, connect-to, and use when F5 or Control-F5 is selected:

Then configure the url to this application in the above property page for the web project. When
you hit F5 in the project, Visual Studio will then launch a browser to that web application and
automatically attach a debugger to the web-server process to enable you to debug it.

ANASWER SHEET
30

Activity 1: Create a timeline chart that shows the steps in creating a program. Make sure to
attach your activity to this answer sheet. Refer to the rubric below:
Indicators 5 4 3 2 1
The timeline
chart has an
excellent
design.
The features of
the chart are
related to the
given topic.
The content is
related to the
given topic.
All instructions
in the activity is
being followed.
5 - Excellent
4 - Very Satisfactory
3 - Satisfactory
2 - Fairly Satisfactory
1 - Poor

Activity 2. What is the significance of studying how to create application projects?


___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
_________________________________
31

Module 4. Week 1
Lesson 1. Comment
Lesson Objectives
At the end of the lesson, you should be able to:
a. Identify the purpose of comment.
b. Create a flowchart showing the process of adding comments in visual
basic.
c. State the importance of comment in creating your code.

DAY 1
WHAT IS IT?
Last quarter,we have tackled about the conditional statement and the procedure in
creating program. Now, let’s study about comment in visual basic.
Comment - is a programming language construct used to embed programmer-readable
annotations in the source code of a computer program. Those annotations are potentially
significant to programmers but typically ignorable to compilers and interpreters. Comments are
usually added with the purpose of making the source code easier to understand.
Purpose of comments
 To summarize code
 Explain the programmer's intent
 To give credits to the creator of the program Inline documentation that helps read reuses,
understand and maintain existing code.
 To create comment, simply type (single quote) on the first character of the line.
How to add comments in Visual Basic
1. Determine which type of comment you want to add. Programmers have several different
main purposes for comments that
determine the exact format and
style of what will be included in the
comment.
 Consider code module
comments. Module
comments are higher-level
comments that usually
describe the overall purposes
of the code module, as well
as other information like
copyright, authorship and
more.
 Assess the need for
procedure comments.
Various functional code
procedures should also be commented. Procedure comments relate to the specific
functions of code, and they help to alert other programmers about the exact results of
a procedure according to how it is written.
32

2. Choose detailed categories of use for your code comments. Some types of comments, like
procedure comments, also come in different forms. Understand these different uses in order to
add the right kinds of comments to your program.
 Assess the use of purpose comments for procedures. These describe what the procedure
does.
 Consider
the use of function
return value
comments. These
will help others to
understand what
values are
returned by
procedure.
 Include
conditional
comments.
Conditional
comments can
describe possible error conditions and error handling, as well as conditions that must
be met for code to work properly.

3. Choose a format for comments. There's also the issue of how you will add comments to
specific lines of code.
 Utilize left-handed
comments. These comments
start at the left of the screen and
continue the whole way across a
line. Commonly, the coder needs
to arbitrarily end the comment near
the right side of the screen, go
down to a new line and continue
the comment.
Use in-line comments.
In-line comments have
an apostrophe directly
after a piece of code
and are placed on the same line.
33

4. Use an apostrophe to mark the beginning of your comments. This is the key step for
actually writing comments into code. The apostrophe is the specific text protocol that the
Visual Basic compiler recognizes for comments. Without this, the computer will try to read the
comments as code.

Name: Section:
Date submitted:

ACTIVITY 1. Create a flowchart containing the process on how to add comments in visual
basic. Be sure to attach your output using a stapler.
Indicators 5 4 3 2 1
The flowchart
contains
systematic
events.
The flowchart
is relevant to
the topic
discussed..
The flowchart
has an
excellent
design..
All
instructions in
the flowchart
making is
followed.

2. What is the importance of comment in programming?


___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
34

___________________________________________________________________________
______________________________________________________________________

Module 4. Week 2-4


Lesson 2. WRITING CODES
Lesson Objectives
At the end of the lesson, you should be able to:
a. Identify the steps on how to write codes.
b. Write codes in vb.net compiler.
c. State the importance of writing codes.

WHAT IS IT?
Last time, we have discussed about comment. Now, we move on to the steps in writing a
code. Let’s start!
Code
 the foundation for all computers, from the one in your cellphone to the one running a
NASA satellite. Due to the prevalence of computers, learning to write code has become
one of the most sought-after skills in the modern employee. In this article, we discuss
what computer code is and look at some steps and tips for how to successfully write
code.
 Code is the language that all computers "speak" and understand. When computer
programmers write code, they issue instructions to a computer and tell it which actions to
perform and in what order.
 Computer coders use different programming languages to communicate with specific
systems.
 Computer code is comprised of strings of typed letters, numbers and figures which
constitute a language, complete with spelling rules and syntax. Someone who knows how
to program or write code is eligible for a variety of career paths. Code is used for an
extremely wide range of activities, from building websites to flying airplanes. Anything that
you can do that involves computers functions because of code.
How to write code

1. Choose a language

The specific language you pick is not as important as you may think. Any computer
language that you choose to study will introduce you to important coding fundamentals like
structures, commands and programming logic. You might not end up using your first language
as a part of your job, but you will gain valuable experience through the process of mastering it.

There are dozens of coding languages that are used for a variety of different projects. If you
want to code websites, you should learn HTML, JavaScript or CSS. If you want to design
analysis or artificial intelligence programs, you will need to know Python. If you are interested
in creating personal computer applications, a basic language like C++ would be a good choice.
You will need to do some experimenting and conduct your own research to find a language
that will work well for you.
35

2. Find a resource

Once you know what you want to learn, it is time to consider your resources. There are
dozens of quality options available for people who want to learn to code. If you are hoping to
land your dream job in the computer programming industry, you may want to start by pursuing
a computer science degree on a college campus.

If you prefer to learn in the comfort of your own home, you can enroll in an online program
through a university or private service. If you enjoy teaching yourself, you might find borrowing
computer programming books from the library, watching how-to videos online or using other
free resources to be your best option. The effectiveness and practicality of each resource will
depend on your individual learning style and schedule.

3. Download an editor

To write code on your personal computer, you will need a text editing program. At their
most basic level, most programming languages are plain text, which means they can be
written using almost any simple text editor. Common options include Notepad++, TextWrangler
and JEdit. Many programming languages have downloadable editing programs that are
created specifically for that language. The best program for you will depend on your budget
and which language you plan to use most often.

4. Start practicing

Once you have picked up some skills by taking classes or watching online tutorials, you
will need to put your knowledge into practice. One of the best ways to learn to code is by
simply doing, even if you find yourself making mistakes. One of the easiest ways to start is by
picking a simple project that you think you will be able to complete. This could be designing an
HTML website, creating a database function with PHP or writing a simple program using any of
the basic languages.

There are hundreds of how-to videos and articles available explaining how to complete
tasks like these using a variety of languages. Using your resources, practice writing code for
your project until you know the process well enough to complete it on your own. Then, you can
move on to something even more complex. Coding is a skill that comes through repetition and
the more you practice, the easier it will be.

5. Continue learning

As your coding proficiency grows, you will be qualified to advertise your services, apply
for jobs and even pursue certification. As you go about finding ways to use your coding skills, it
is important that you continue to learn. The computer industry advances and evolves each
year, with new programs and techniques regularly being invented and implemented. To remain
competitive and informed, you will need to look for ways to continue improving your skills.
Methods for writing code will advance and develop in the years to come, so your skillset will
need to evolve at the same rate.

TIPS IN WRITING CODES


36

Here are some useful tips for how to write successful code:

 Start simple. Coding is a technical skill that has the potential to be overwhelming for
new learners. Be sure to start with simple projects and languages that suit the skills of
a beginner. If you are dedicated and a hard worker, you will be capable of working on
more advanced tasks in just a few months.
 Be patient. Coding is a skill best learned through hours of practice. Before you will be
able to fully design a website or create a video game, you will need to put in
considerable time and energy. If you are patient with yourself and with others, you will
be able to maintain a positive attitude and outlook throughout your learning process.
 Persevere. While writing code, you are certain to come across issues, glitches and
bugs that threaten the functionality of your entire project. In some cases, the only way
to fix them is to keep trying different solutions until one works. This can be frustrating,
but if you are willing to persevere and stay on task, you will be more equipped to solve
similar problems in the future.

Name: Section:
Date submitted:

ACTIVITY 1. Create a simple flowchart containing the steps in writing codes. Put your output in
a separate sheet of A4 bond paper then attach it in your answer sheets using stapler. Write
your name in your output. Refer to rubrics below:
Indicators 5 4 3 2 1
The flowchart
contains
systematic
events.
The flowchart
is relevant to
the topic
discussed..
The flowchart
has an
excellent
design..
All
instructions in
the flowchart
making is
followed.

ACTIVITY 2. Download vb.net compiler version 2.3 in your mobile phones. Write the
“helloworld” code in the compiler. The full code details shall be sent in your group chat. You
shall send your outputs in your group chat before the deadline.

ACTIVITY 3. Why is writing codes important?


___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
37

___________________________________________________________________________
___________________________________________________________________________
___________________________________________________________________________
__________________

Week 5-7.
Direction: Download the Visual Basic App. A video tutorial will be sent in your group chat.
Follow the instructions on how to create a program then do it on your own. Take a video on
your activity.

You might also like