M1 10TVE Programming-q2
M1 10TVE Programming-q2
Technical Vocational
Education (TVE)
COMPUTER PROGRAMMING
Quarter 2 – Module 1
Starting a New Project
TVE 10 – ICT (Programming in Visual Studio 2010)
Alternative Delivery Mode
Quarter 2 – Module 1: Starting a New Project
First Edition, 2020
Republic Act 8293, section 176 states that: No copyright shall subsist in any work of the
Government of the Philippines. However, prior approval of the government agency or office
wherein the work is created shall be necessary for exploitation of such work for profit. Such
agency or office may, among other things, impose as a condition the payment of royalties.
Borrowed materials (i.e., songs, stories, poems, pictures, photos, brand names, trademarks, etc.)
included in this module are owned by their respective copyright holders. Every effort has been
exerted to locate and seek permission to use these materials from their respective copyright
owners. The publisher and authors do not represent nor claim ownership over them.
Management Team:
Neil Vincent C. Sandoval
Education Program Supervisor, LRMS
ii
What I Need to Know
Hello, Grade 10 Learners! This module is designed to help you fully understand the
process of creating your first user interface using Visual Basic 2010. Feel free to explore
each part and accomplish each activity at your own pace.
This module is here to guide you through this lesson. In case you were not able
to follow and understand some instances, you can always go back to that part.
What I Know
Choose the letter of the best answer. Write the chosen letter on a separate sheet of
paper.
1. Which of the following control is used to accept and display editable text?
a. Graphic c. Picture
b. Label d. Text
2. Which of the following form property is used to indicate the background color of
the form?
a. Background Color c. Form Color
b. Background Image d. Form Background Color
3. Which of the following control is used when you want to display text used for
labeling other controls and output?
a. Clock c. Textbox
b. Label d. Timer
4. Which of the following is the system by which the user interacts with the
computer?
1
a. Form c. Work Area
b. Layout d. User Interface
5. Which of the following property is used to indicate the text that will appear in
the button?
a. Caption c. Name
b. Format d. Text
Lesson
What’s In
Let us have a recap on our last module on Form Controls, Properties and other
concepts. Answer the guide questions.
1. What is a control?
2. Name at least 5 controls and give their functions
3. How do we name controls?
What’s New
Bet you are smiling because you easily identified those sites. The picture above
are the user interface of the products or services you visited. Do you know that a good
user interface is one reason you keep coming back to the page?
2
Today, as you create your first program in Visual Basic, you will learn how to
create a user interface using Visual Basic. This will be the start of a long but fun coding
in VB. Enjoy the process!
What is It
Things like buttons, textboxes, and labels are all things that you can add to your
Forms. They are known as controls and are kept in the Toolbox for ease of use.
3
Changing the properties
All the Visual Basic Objects can be moved, resized or customized by setting their
properties. A property is a value or characteristic held by a Visual Basic object, such
as Text or Fore Color.
You can change the properties of an object by typing or selecting the values
from the Properties window.
Lesson
Create, Run and Save the Project
2
Writing a Code:
A Visual Basic Statement has a format of: objectname. property=value
Where:
objectname refers to the object assigned name in the project
property- refers to the associated property to be edited or changed in an object
value – is the assigned value for the corresponding property.
Example:
Form1.backcolor=vbBlue
lbldisplay.text = “Hello students”
Debugging
Debugging is the process of finding the errors in the code and removing these
errors from the code. Program errors come in three forms: syntax, logic and runtime
errors.
1. syntax errors – refers to a character or string incorrectly placed in a command or
instruction that causes a failure in execution
4
2. logic error – are those errors that prevent your program from doing what you
expected it to do
What’s More
Activity 2:
5
Activity 3:
From activity 2, set the properties of the form following the table below:
Identify the following terms. Write yur answers on the space provided.
What I Can Do
Activity 4: Create a form that will produce the interface below. Select the appropriate
control to produce the same output/appearance. Be creative and add colors to your
form.
Criteria:
Presentation: 50%
Content: 50%
6
Sample Output:
Note: In a long bond paper, draw the user interface and create a table for changing
the properties of the objects used.
Assessment
Choose the letter of the best answer. Write the chosen letter on a separate sheet of
paper.
1. What term refers to the object assigned name in the project?
a. Data c. Objectname
b. Property d. Value
2. Which of the following refers to a character or string incorrectly placed in a
command or instruction that causes a failure in execution?
a. debug c. logic error
b. error d. syntax error
4. Which of the following refers to the type of user interface that uses graphics to
represent the input and output of the program?
a. IDE c. OOP
b. GUI d. RAD
5. What term refers to the assigned value for the corresponding property?
a. Information c. Object
b. Labelname d. Value
7
8. Which of the following is the system by which the user interacts with the
computer?
a. Form c. Work Area
b. Layout d. User Interface
9. What is the correct format of writing a visual basic statement?
a. Objectname.property=value c. input.process=output
b. Data.property.value d. objectname+properties=value
10. Which of the following form property is used to indicate the background color of
the form?
a. Background Color c. Form Color
b. Background Image d. Form Background Color