0% found this document useful (0 votes)
2 views10 pages

M7 10TVE Programming q1

This document is a module for Grade 10 students on Technical-Vocational Education focusing on ICT and Programming in Visual Basic 2010. It covers form controls, properties, and basic programming concepts, including lessons on designing user interfaces and writing Visual Basic projects. The module includes activities, assessments, and guidelines for using Visual Basic effectively.

Uploaded by

Miriam Pidul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views10 pages

M7 10TVE Programming q1

This document is a module for Grade 10 students on Technical-Vocational Education focusing on ICT and Programming in Visual Basic 2010. It covers form controls, properties, and basic programming concepts, including lessons on designing user interfaces and writing Visual Basic projects. The module includes activities, assessments, and guidelines for using Visual Basic effectively.

Uploaded by

Miriam Pidul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

10

Technical-Vocational
Education (TVE)
ICT - Programming in Visual
Basic 2010
Quarter 1 – Module 7:
Form Controls, Properties and
Other Concepts

i
TVE – ICT (Programming in Visual Studio 2010) 10
Quarter 1 – Module 7: Form Controls, Properties and Other Concepts
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.

Published by the Department of Education – Schools Division Office of Makati City


OIC-Schools Division Superintendent: Carleen S. Sedilla CESE
OIC-Assistant Schools Division Superintendent: Brian E. Ilan EdD

Development Team of the Module

Writer: Arlene A. Purisima

Editor: Jean T. Tumaneng

Reviewer: Celedonia T. Teneza EdD

Layout Artist: Jean T. Tumaneng

Management Team:
Angelita S. Jalimao
Chief Education Supervisor, Curriculum Implementation Division

Neil Vincent C. Sandoval


Education Program Supervisor, LRMS

Celedonia T. Teneza EdD


Education Program Supervisor, EPP/TLE/TVL

Printed in the Philippines by the Schools Division Office of Makati City


Through the Support of the City Government of Makati (Local School Board)

Department of Education – Schools Division Office of Makati City

Office Address: Gov. Noble St., Brgy. Guadalupe Nuevo


City of Makati, Metropolitan Manila, Philippines 1212
Telefax: (632) 8882-5861 / 8882 - 5862
E-mail Address: [email protected]

ii
What I Need to Know
Hello, Grade 10 Learners! This module is designed to help you fully understand
the Form Controls, Properties and Other Concepts of Visual Basic 2010 and some
related terms. 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.
The module is divided into 2 Lesson
Lesson 1 – Form, Controls and Properties
After going through this module, you are expected to:
a. identify the controls, their names and functions;
b. recognize how to change the properties, rename, delete the controls;
Lesson2 – Basic Steps in Writing a Visual Basic Project
a. learn how to create a simple program from Visual Basic
b. describe the Timing and Modes while developing a program

What I Know

1. What object primarily represents the program interface?


a. Form Design Window c. Project Explorer Window
b. Form d. Properties Window
2. Which of the following steps in writing a Visual Basic project includes adding of
control so the user can interact with the program?
a. Setup the Properties c. Design the user interface
b. Coding d. Runtime
3. Which of the following modes describes the time spent in writing and designing the
codes for the user?
a. Design time c. Break Time
b. Run time d. Debug Time
4. Which of the following buttons enlarges the current window to a full screen?
a. Close button c. Minimize button
b. Maximize button d. Restore button
5. What part of Visual Basic window contains icon that represents commonly used
controls?
a. Toolbar c. Form
b. Toolbox d. Properties window
6. What do we call the VB files a programmer manipulates and deal with?
a. Command Files c. Executable Files
b. Editable Files d. Solution Files
7. Which of the following controls is used to select, move, and resize the form and other
controls?
a. Pointer b. Label c. Textbox d. Button
8. Forms, command, buttons labels, etc. are examples of _________?
a. Object b. Tool c. Icon d. Image
9. What term is referred to as a set of rules that must be complied with including the
spelling, symbols and other text or words?
a. Rule c. Syntax
b. Standard d. Format
10. What files does an end user run in the computer?
a. Executable files c. Solution Files

1
b. Command Files d. User Files
11. What do we call the mistakes in the source code, such as misspelling of an
instruction?
a. Logic error c. Syntax error
b. Runtime error d. Program error

12. What is referred to as the time spent a user runs an application?


a. Design time c. Break Time
b. Run time d. Debug Time
13. What is the first page that displays when you open a new project in VB?
a. Toolbox b. Menu bar c. Toolbar d. Start page
14. What control displays a box and a label associated with the box?
a. Pointer c. Checkbox
b. Label d. List Box
15. Which of the following controls is used to select, move, and resize the form and other
controls?
a. Pointer b. Label c. Textbox d. Button

Lesson Form Controls, Properties and


1 other Concepts

What’s In

Can you still recall our last meetings’ discussion? Well, let us try to identify the
Parts of the Visual Basic Environment. Write your answers on separate sheet of paper.

The word “Visual” refers to the way the Graphical User Interface (GUI) is
designed.

2
What’s New
Activity 1: Let us Cook!
Transfer all the ingredients from the box to cook for your favorite dish adobo.
Write all the ingredients in the bowl on the right side

pork fish cheese


My Yummy Adobo!!
soy sauce pechay chicken

pineapple banana vinegar

chicken egg black pepper

Looks yummy, isn’t it? You need to complete the ingredients to prepare a
delicious meal. Every ingredient in a recipe has a specific purpose. One should know
how to mix or combine the ingredients properly. In Visual Basic, it is important to know
the object or control to enhance the appearance of your program.

What is It
Controls
In Visual Basic 2010, controls are useful tools that can be placed in the form to
perform various tasks. The toolbox contains the controls of VB10. Some of the most
used controls are Button, Label, Textbox, Radio button, CheckBox, ListBox and
PictureBox. These controls can be dragged or dropped to the form.
CONTROL NAME DESCRIPTION
Pointer Selects objects
Button Displays a button that the user can
click to perform an action
Check box Displays a box and a label
associated with the box
Combo box Displays a drop-down list box
DateTime Picker Displays date and/or time
information
Label Draws a box to display text
List box Displays a list of options from which
the user can select
Picture box Draws a box to display graphics
Progress Bar Displays a horizontal bar which
indicates the progress of an action
Radio (option) button Control that consists of a circle and
a label associated with the circle
Text box Draws a box that can display text
and let the user type in text
Timer Places a timer on a form

3
Control Names
Controls have names by default. Examples are Button1, Label1, TextBox1
and so on. The name of the control in internal name that the programmer uses
in referencing codes. You can change the name of the control using the following
guidelines:
1. Begin with letters (ex: name, num1, age001)
2. Use meaningful and descriptive names (ex: surname, address, sum)
3. No space allowed (ex: student1, student100)
4. No special symbols except underscore (ex: grade_1, level_2)
5. Avoid reserved words
Activity 2:
Write V if the identifier is a valid variable and IV if Invalid.
____________ 1. hello ___________ 6. prod_123
____________ 2. single ___________ 7. employee name
____________ 3. #passGrade ___________ 8. numero_2
____________ 4. end ___________ 9. age
____________ 5. streetcode ___________ 10. city101

Renaming Controls
You can rename the controls by using the commands from the Properties
window.
1. Select the control, go to properties window
where the properties of the control are
listed.
2. Click the alphabetical list icon on the
properties window to arrange the list of
properties in alphabetical order.
3. Go to Name property then change the name
of the control.
Deleting the Control
There are many ways to delete a control in the form.
1. Right click on the object and on the context menu, click Delete
2. You can also go to the menu bar, click edit, them Delete
3. Another way is to select the control then press Delete from the keyboard.

Lesson Basic Steps in Writing a Visual Basic


2 Project

Steps in Writing a Project


• Explore the files that make up a Visual Basic project. In VB, a project is
the group of all the files that make up your program.
• Design the User Interface (these include controls needed so a user
can interact with the program)
• Set Up the properties for the controls e.g. names
• Coding – following the syntax rules of VB, Syntax are the set of
rules that must be complied with including the spelling,
punctuation marks, spacing, symbols and other text or words.
• Run the program by clicking RUN button or press F5
• Debug the program – it involves identifying a problem, isolating the source
of the problem, and then either correcting the problem or determining a
way to work around it.

4
Modes in Visual Basic

Design Time It is the process of creating an application,


designing an interface, setting the properties,
and writing the code.
Run Time The time spent when the user runs an
application
Break Time It is the time spent in checking, debugging,
and other situation. At this time, no changes
can be made to the program

Kinds of Visual Basic Files


• Solution files – (.sln) these are the files that a programmer manipulate
and deal with.
• Executable files – (.exe) a file that contains a program - that is, a kind
of file that is capable of being executed or run as a program in the
computer.

Errors in Visual Basic


In any programming language, there are three kinds of errors: syntax errors,
runtime errors, and logic errors.
• Syntax error - are errors when the syntax of the language is not followed.
• Runtime error - A runtime error is an application error that occurs during
program execution.
• Logical error - is a mistake in a program's source code that results in incorrect
or unexpected behavior

What’s More

Activity 3: Crossword Puzzle


Accomplish the crossword puzzle to check your learning on this lesson. Write your
answer on a separate sheet of paper. Hints are given to help you.

5
What I Have Learned
Fill in the blanks.
____________1. This control is used to perform an immediate action when it is clicked
by the user.
____________ 2. This is the bar that fills up to indicate the progress of an application
____________ 3. This control displays a list from which the user can select items
____________ 4. The type of error that happens during runtime
____________ 5. The type of file where programmer can still modify the program
Answer the following:
1. Differentiate Radio button from checkbox
_______________________________________________________________________________
_______________________________________________________________________________
2. Which is more difficult to debug, logical or syntax error? Why? Give example.
________________________________________________________________________________
________________________________________________________________________________

What I Can Do

Create a form that will copy 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%
Sample Output:

Assessment

6
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 select, move, and resize the form and other
controls?
a. Pointer b. Label c. Textbox d. Button
2. What is the control used to display graphical objects or text?
a. Icons c. Picture box
b. Image d. Textbox
3. What is the top line of the Visual Basic screen that includes the project name, and
the minimize, maximize, or restore button?
a. Menu Bar c. Toolbox
b. Scroll Bar d. Title bar
4. What do we call the files that an end user runs in the computer?
a. Executable files c. Solution Files
b. Command Files d. User Files
5. Which of the following buttons permanently closes the current document you are
working with VB program?
a. Close Button c. Minimize button
b. Maximize Button d. Restore Button
6. What are the mistakes in the source code, such as misspelling of an
instruction?
a. Logic error c. Syntax error
b. Runtime error d. Program error
7. This is where the user interface is designed by selecting the desired
control icons or object from the toolbox
a. Form Design Window c. Standard Toolbar
b. Project Explorer Window d. Toolbox
8. What is referred to as a mistake in a program's source code that results in incorrect
or unexpected behavior?
a. Logic error c. Syntax error
b. Runtime error d. Program error
9. Which of the following will display the controls needed to develop your project?
a. Menu bar c. Object Box
b. Name bar d. Toolbox
10. What is the shortcut key command to run the program?
a. F1 b. F2 c. F4 d. F5
11. Which of the following modes describes the time spent in writing and designing
the codes for the user?
a. Design time c. Break Time
b. Run time d. Debug Time
12. What is the object that primarily represents the program interface?
a. Form Design Window c. Project Explorer Window
b. Form d. Properties Window
13. What do we call the time spent in checking, debugging, and other situations where
no change can be made to the program?
a. Break Time c. Run Time
b. Debug Time d. All the Time
14. What is the first page when you open a new project in VB?
a. Toolbox b. Menu bar c. Toolbar d. Start page
15. What control will display date and/or time information
a. Date c. DateTime Picker
b. Time d. Timer

7
Additional Activities

Design a form that will show the use of CheckBox, RadioButton, PictureBox,
Label, Textbox, and Button. Be creative and add colors to your form. Write your
answer in long bond paper, to be submitted next meeting.

For inquiries or feedback, please write or call:

Department of Education – Schools Division Office of Makati City

Gov. Noble St., Brgy. Guadalupe Nuevo


City of Makati, Metropolitan Manila, Philippines 1212

Telefax: (632) 8882-5861 / 8882-5862

Email Address: [email protected]

You might also like