SlideShare a Scribd company logo
Introduction
to HCI
INSTRUCTOR:
ELLEN GRACE PORRAS
Visual Basic.Net
2
• Elements
• Design
• Variables
• Dimension
• Data Types
Elements
3
• Button
• Message Box
• Textbox
• Radio Button
• Checkbox
Button with Math Functions
Syntax: ADDITION
MessageBox.Show(10 + 5)
4
ADDITION
Syntax: SUBTRACTION
MessageBox.Show(10 - 5)
5
Button with Math Functions
SUBTRACTION
Syntax: MULTIPLICATION
MessageBox.Show(10 * 5)
6
Button with Math Functions
MULTIPLICATION
Syntax: DIVISION
MessageBox.Show(10 / 5)
7
Button with Math Functions
DIVISION
Text Box + Button
Math Functions
Syntax:
Textbox1.text = 10+3
Textbox1.text = 10-3
Textbox1.text = 10*3
Textbox1.text = 10/3
8
ADDITION
Answer:
SUBTRACTION
MULTIPLICATION
DIVISION
Two Text Boxes + Button +Messagebox
Math Functions
Syntax: Addition
MessageBox.Show(Textbox1.Text ++ Textbox2.Text)
9
ADDITION
10
First Number:
SUBTRACTION
MULTIPLICATION
DIVISION
Second Number: 5
Message Box
//Answer here
15
Two Text Boxes + Button +Messagebox
Math Functions
Syntax: Addition
MessageBox.Show(Textbox1.Text - Textbox2.Text)
10
ADDITION
10
First Number:
SUBTRACTION
MULTIPLICATION
DIVISION
Second Number: 5
Message Box
//Answer here
10
Two Text Boxes + Button +Messagebox
Math Functions
Syntax: Addition
MessageBox.Show(Textbox1.Text * Textbox2.Text)
11
ADDITION
10
First Number:
SUBTRACTION
MULTIPLICATION
DIVISION
Second Number: 5
Message Box
//Answer here
50
Two Text Boxes + Button +Messagebox
Math Functions
Syntax: Addition
MessageBox.Show(Textbox1.Text / Textbox2.Text)
12
ADDITION
10
First Number:
SUBTRACTION
MULTIPLICATION
DIVISION
Second Number: 5
Message Box
//Answer here
2
Two Text Boxes + Button and Textbox
Math Functions
Syntax:
Addition: Textbox3.text = Textbox1.Text ++ Textbox2.Text
Subtraction: Textbox3.text = Textbox1.Text - Textbox2.Text
Multiplication: Textbox3.text = Textbox1.Text * Textbox2.Text
Division: Textbox3.text = Textbox1.Text / Textbox2.Text
13
ADDITION
10
First Number:
SUBTRACTION
MULTIPLICATION
DIVISION
Second Number: 5
15
Answer:
14
Data types determine the type of data that any variable can store. Variables belonging
to different data types are allocated different amounts of space in the memory. There
are various data types in VB.NET. They include:
• Boolean: Its value can be either True or False.
• Char: Single character
• Date: Date values
• Integer: Whole numbers
• String: Text values
What are Data Types?
Variables
15
A variable is a name given to a
memory location. The value
stored in a variable can be
changed during program
execution.
Variables are called
variables because they vary, i.e.
they can have a variety of
values. Thus a variable can be
considered as a quantity which
assumes a variety of values in a
particular problem.
16
Dim in the VB
language is short for
Dimension, and it is
used to declare
variables.
It is a way to refer to
the declared term
rather than the same
object over and over
again.
Dim
Declare a variable Mymessage as a string with a value “Hello BSIT
2nd Year”
Dim Mymessage As String = "Hello BSIT 2nd Year!”
MessageBox.Show(Mymessage)
//Or
Dim Mymessage As String = "Hello BSIT 2nd Year!”
Textbox1.Text = Mymessage
17
Example: String
Example: Integer
Declare a variable Mynumber as integer with a value of 10. Show the output using
MessageBox.
Dim Mynumber As Ingteger = 10
MessageBox.Show(Mynumber)
//or this
Dim Mynumber As Ingteger = 10
TextBox1.Text = Mynumber
18
Example: String and Integer
Declare a variable Mynumber as integer with a value of 10 and
Mymessage as string with a value of “Hello”. Show the output using
MessageBox.
Dim Mynumber As Ingteger = 10
Dim Mymessage As String = “Hello”
MessageBox.Show(Mymessage & Mynumber)
19
Check your knowledge
1. Display “Good Morning!” using a MessageBox
2. Display “Information Technology” using TextBox3
3. Declare the variables firstname, lastname as string. Display the
fullname using textbox2.
20
Let’s check your Knowledge
Declare a variable firstname, lastname and fullname as String. Combine
all the variables to show the FULLNAME on a Messagebox.
21
Your Full name is
FULL NAME
Enter First name: Ellen Grace
Porras
Enter last name:
Message Box
Your full name is: Ellen Grace Porras
Let’s check your Knowledge
Declare a variable firstname, lastname and fullname as String. Combine
all the variables to show the FULLNAME on a Messagebox.
22
Your Full name is
FULL NAME
Enter First name: Ellen Grace
Porras
Enter last name:
Message Box
Ellen Grace Porras
Let’s check your Knowledge
Declare a variable firstname, lastname and fullname as String. Combine
all the variable to show the FULL NAME on a Messagebox.
Dim firstname, lastname, fullname As String
firstname =Textbox1.Text
lastname = Textbox2. Text
fullname = Textbox1. Text + “ ” + Textbox2.Text
Messagebox.Show(“Your full name is: “ + fullname)
23
Let’s try with math functions
Declare a variable num1, num2 and answer as integer. Show the output
using MessageBox.
Dim num1, num2, answer As Ingteger
num1=5
num2 =10
answer =num1+num2
MessageBox.Show(answer)
24
Let’s try with math functions
Declare a variable num1, num2 and answer as integer. Show the output
using MessageBox.
Dim num1, num2, answer As Ingteger
num1=Textbox1.Text
num2 = Textbox1.Text
answer =num1+num2
MessageBox.Show(answer)
25
Let’s try with math functions
Declare a variable num1, num2 and answer as integer. Show the output using Textbox.
Dim num1, num2, answer As Ingteger
num1=Textbox1.Text
num2 = Textbox2.Text
answer =num1+num2
Textbox3.text = answer
Textbox1.Clear
Textbox2.Clear
26
Activity 1: Convert ft to cm
Design: Text Box and Button
27
Convert
CONVERTER (ft to cm)
Enter ft:
Answer:
Activity 1: Convert ft to cm
Dim ft, answer As Ingteger
ft=Textbox1.Text
answer =ft*30.48
Textbox2.Text = answer
28
Convert
CONVERTER (ft to cm)
Enter ft:
Answer:
Activity 2: Get the area of a Rectangle
Design: Text Box and Button
29
Compute
Area of a Rectangle
Length:
Width:
Area:
Activity 2: Get the area of a Rectangle
Dim lngth, wid,area As Ingteger
lngth=Textbox1.Text
wid=Textbox2.Text
area =lngth * wid
Textbox3.Text = area
30
Compute
Area of a Rectangle
Length:
Width:
Area:
ASSIGNMENT
Declare variables for username and password as string
Given:
Username=“Admin”
Password=“Pass123”
Conditions:
◦ If the user entered correct username and password on textbox1 and
textbox2, print on a messagebox “Welcome to Visual Basic”
◦ If the user entered incorrect username on textbox1, print on a
messagebox “incorrect username”
◦ If the user entered incorrect password on textbox2, print on a
messagebox “incorrect password”
31
LOG IN
LOG IN FORM
USERNAME:
PASSWORD:
Thank you
Presenter name: Ellen Grace D. Porras
Email address: egporras@psu.palawan.edu.ph

More Related Content

PPT
Ch (2)(presentation) its about visual programming
PPS
Visual Basic Review - ICA
PDF
Visual basic asp.net programming introduction
PPTX
CHAPTER 3 - Lesson B
PPTX
Lesson 6 Introduction to Human Computer Interaction.pptx
PPT
Visual basic intoduction
PDF
Visualbasic tutorial
PDF
National diploma in computer technology unesco-nigeria tve
Ch (2)(presentation) its about visual programming
Visual Basic Review - ICA
Visual basic asp.net programming introduction
CHAPTER 3 - Lesson B
Lesson 6 Introduction to Human Computer Interaction.pptx
Visual basic intoduction
Visualbasic tutorial
National diploma in computer technology unesco-nigeria tve

Similar to Lesson 5 Introduction to Human Computer Interaction (20)

PPT
Ms vb
DOCX
Docimp
PPTX
Chapter 4 — Variables and Arithmetic Operations
PPT
Introduction to VB.Net By William Lacktano.ppt
DOCX
PT1420 File Access and Visual Basic .docx
PDF
Ict project pdf
PPTX
.Net Technologies MessageBox using Visual basic.pptx
PPT
Visual Basic 6.0
PPTX
Variables and calculations_chpt_4
PDF
Visual Basics for Application
PDF
Part 12 built in function vb.net
PPTX
Vb6.0 intro
PPT
CHPATER OF VISUAL PROGRAMMING IN WHICH ALL
PPT
ملخص البرمجة المرئية - الوحدة الثالثة
PPTX
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
PPTX
Sharbani bhattacharya VB Structures
PPT
Visual basic 6.0
PPTX
Chapter 04
DOC
Visual basic
PPTX
Function 2
Ms vb
Docimp
Chapter 4 — Variables and Arithmetic Operations
Introduction to VB.Net By William Lacktano.ppt
PT1420 File Access and Visual Basic .docx
Ict project pdf
.Net Technologies MessageBox using Visual basic.pptx
Visual Basic 6.0
Variables and calculations_chpt_4
Visual Basics for Application
Part 12 built in function vb.net
Vb6.0 intro
CHPATER OF VISUAL PROGRAMMING IN WHICH ALL
ملخص البرمجة المرئية - الوحدة الثالثة
VISUAL BASIC 6 - CONTROLS AND DECLARATIONS
Sharbani bhattacharya VB Structures
Visual basic 6.0
Chapter 04
Visual basic
Function 2
Ad

More from EllenGracePorras (20)

PPTX
Lesson 6 Information Management for BSIT.pptx
PPTX
Information Management for BSIT Students.pptx
PPTX
5 Laboratory Basic Calculator using Visual basic.pptx
PPTX
.Net Technologies - Visual Basic . Net.pptx
PPTX
Geographic Information System Lesson 6 IT
PPTX
Lesson 3 Introduction to Human Computer Interaction.pptx
PPTX
Geographic Information Systems GIS for BSIT
PPTX
Lesson 3 Introduction to Human Computer Interaction.pptx
PPTX
Lesson 4 Introduction to Human Computer Interaction.pptx
PPTX
Geographic Information System(GIS).pptx
PPTX
Geographic Information Systems (GIS).pptx
PPTX
Advanced Database Systems.pptx
PPTX
Data Manipulation Language.pptx
PPTX
Advanced Database Systems - Presentation 4.pptx
PPTX
Advanced Database Systems - Presentation 3.pptx
PPTX
Advanced Database Systems - Presentation 2.pptx
PPTX
Advanced Database Systems - Presentation 1 with quiz.pptx
PPTX
Structured Query Language (SQL) Part 2.pptx
PPTX
SQL Where Clause.pptx
PPTX
SQL Statements.pptx
Lesson 6 Information Management for BSIT.pptx
Information Management for BSIT Students.pptx
5 Laboratory Basic Calculator using Visual basic.pptx
.Net Technologies - Visual Basic . Net.pptx
Geographic Information System Lesson 6 IT
Lesson 3 Introduction to Human Computer Interaction.pptx
Geographic Information Systems GIS for BSIT
Lesson 3 Introduction to Human Computer Interaction.pptx
Lesson 4 Introduction to Human Computer Interaction.pptx
Geographic Information System(GIS).pptx
Geographic Information Systems (GIS).pptx
Advanced Database Systems.pptx
Data Manipulation Language.pptx
Advanced Database Systems - Presentation 4.pptx
Advanced Database Systems - Presentation 3.pptx
Advanced Database Systems - Presentation 2.pptx
Advanced Database Systems - Presentation 1 with quiz.pptx
Structured Query Language (SQL) Part 2.pptx
SQL Where Clause.pptx
SQL Statements.pptx
Ad

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
Teaching material agriculture food technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Encapsulation theory and applications.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Electronic commerce courselecture one. Pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Teaching material agriculture food technology
20250228 LYD VKU AI Blended-Learning.pptx
Network Security Unit 5.pdf for BCA BBA.
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Review of recent advances in non-invasive hemoglobin estimation
Diabetes mellitus diagnosis method based random forest with bat algorithm
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Encapsulation theory and applications.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Bridging biosciences and deep learning for revolutionary discoveries: a compr...

Lesson 5 Introduction to Human Computer Interaction

  • 2. Visual Basic.Net 2 • Elements • Design • Variables • Dimension • Data Types
  • 3. Elements 3 • Button • Message Box • Textbox • Radio Button • Checkbox
  • 4. Button with Math Functions Syntax: ADDITION MessageBox.Show(10 + 5) 4 ADDITION
  • 5. Syntax: SUBTRACTION MessageBox.Show(10 - 5) 5 Button with Math Functions SUBTRACTION
  • 6. Syntax: MULTIPLICATION MessageBox.Show(10 * 5) 6 Button with Math Functions MULTIPLICATION
  • 7. Syntax: DIVISION MessageBox.Show(10 / 5) 7 Button with Math Functions DIVISION
  • 8. Text Box + Button Math Functions Syntax: Textbox1.text = 10+3 Textbox1.text = 10-3 Textbox1.text = 10*3 Textbox1.text = 10/3 8 ADDITION Answer: SUBTRACTION MULTIPLICATION DIVISION
  • 9. Two Text Boxes + Button +Messagebox Math Functions Syntax: Addition MessageBox.Show(Textbox1.Text ++ Textbox2.Text) 9 ADDITION 10 First Number: SUBTRACTION MULTIPLICATION DIVISION Second Number: 5 Message Box //Answer here 15
  • 10. Two Text Boxes + Button +Messagebox Math Functions Syntax: Addition MessageBox.Show(Textbox1.Text - Textbox2.Text) 10 ADDITION 10 First Number: SUBTRACTION MULTIPLICATION DIVISION Second Number: 5 Message Box //Answer here 10
  • 11. Two Text Boxes + Button +Messagebox Math Functions Syntax: Addition MessageBox.Show(Textbox1.Text * Textbox2.Text) 11 ADDITION 10 First Number: SUBTRACTION MULTIPLICATION DIVISION Second Number: 5 Message Box //Answer here 50
  • 12. Two Text Boxes + Button +Messagebox Math Functions Syntax: Addition MessageBox.Show(Textbox1.Text / Textbox2.Text) 12 ADDITION 10 First Number: SUBTRACTION MULTIPLICATION DIVISION Second Number: 5 Message Box //Answer here 2
  • 13. Two Text Boxes + Button and Textbox Math Functions Syntax: Addition: Textbox3.text = Textbox1.Text ++ Textbox2.Text Subtraction: Textbox3.text = Textbox1.Text - Textbox2.Text Multiplication: Textbox3.text = Textbox1.Text * Textbox2.Text Division: Textbox3.text = Textbox1.Text / Textbox2.Text 13 ADDITION 10 First Number: SUBTRACTION MULTIPLICATION DIVISION Second Number: 5 15 Answer:
  • 14. 14 Data types determine the type of data that any variable can store. Variables belonging to different data types are allocated different amounts of space in the memory. There are various data types in VB.NET. They include: • Boolean: Its value can be either True or False. • Char: Single character • Date: Date values • Integer: Whole numbers • String: Text values What are Data Types?
  • 15. Variables 15 A variable is a name given to a memory location. The value stored in a variable can be changed during program execution. Variables are called variables because they vary, i.e. they can have a variety of values. Thus a variable can be considered as a quantity which assumes a variety of values in a particular problem.
  • 16. 16 Dim in the VB language is short for Dimension, and it is used to declare variables. It is a way to refer to the declared term rather than the same object over and over again. Dim
  • 17. Declare a variable Mymessage as a string with a value “Hello BSIT 2nd Year” Dim Mymessage As String = "Hello BSIT 2nd Year!” MessageBox.Show(Mymessage) //Or Dim Mymessage As String = "Hello BSIT 2nd Year!” Textbox1.Text = Mymessage 17 Example: String
  • 18. Example: Integer Declare a variable Mynumber as integer with a value of 10. Show the output using MessageBox. Dim Mynumber As Ingteger = 10 MessageBox.Show(Mynumber) //or this Dim Mynumber As Ingteger = 10 TextBox1.Text = Mynumber 18
  • 19. Example: String and Integer Declare a variable Mynumber as integer with a value of 10 and Mymessage as string with a value of “Hello”. Show the output using MessageBox. Dim Mynumber As Ingteger = 10 Dim Mymessage As String = “Hello” MessageBox.Show(Mymessage & Mynumber) 19
  • 20. Check your knowledge 1. Display “Good Morning!” using a MessageBox 2. Display “Information Technology” using TextBox3 3. Declare the variables firstname, lastname as string. Display the fullname using textbox2. 20
  • 21. Let’s check your Knowledge Declare a variable firstname, lastname and fullname as String. Combine all the variables to show the FULLNAME on a Messagebox. 21 Your Full name is FULL NAME Enter First name: Ellen Grace Porras Enter last name: Message Box Your full name is: Ellen Grace Porras
  • 22. Let’s check your Knowledge Declare a variable firstname, lastname and fullname as String. Combine all the variables to show the FULLNAME on a Messagebox. 22 Your Full name is FULL NAME Enter First name: Ellen Grace Porras Enter last name: Message Box Ellen Grace Porras
  • 23. Let’s check your Knowledge Declare a variable firstname, lastname and fullname as String. Combine all the variable to show the FULL NAME on a Messagebox. Dim firstname, lastname, fullname As String firstname =Textbox1.Text lastname = Textbox2. Text fullname = Textbox1. Text + “ ” + Textbox2.Text Messagebox.Show(“Your full name is: “ + fullname) 23
  • 24. Let’s try with math functions Declare a variable num1, num2 and answer as integer. Show the output using MessageBox. Dim num1, num2, answer As Ingteger num1=5 num2 =10 answer =num1+num2 MessageBox.Show(answer) 24
  • 25. Let’s try with math functions Declare a variable num1, num2 and answer as integer. Show the output using MessageBox. Dim num1, num2, answer As Ingteger num1=Textbox1.Text num2 = Textbox1.Text answer =num1+num2 MessageBox.Show(answer) 25
  • 26. Let’s try with math functions Declare a variable num1, num2 and answer as integer. Show the output using Textbox. Dim num1, num2, answer As Ingteger num1=Textbox1.Text num2 = Textbox2.Text answer =num1+num2 Textbox3.text = answer Textbox1.Clear Textbox2.Clear 26
  • 27. Activity 1: Convert ft to cm Design: Text Box and Button 27 Convert CONVERTER (ft to cm) Enter ft: Answer:
  • 28. Activity 1: Convert ft to cm Dim ft, answer As Ingteger ft=Textbox1.Text answer =ft*30.48 Textbox2.Text = answer 28 Convert CONVERTER (ft to cm) Enter ft: Answer:
  • 29. Activity 2: Get the area of a Rectangle Design: Text Box and Button 29 Compute Area of a Rectangle Length: Width: Area:
  • 30. Activity 2: Get the area of a Rectangle Dim lngth, wid,area As Ingteger lngth=Textbox1.Text wid=Textbox2.Text area =lngth * wid Textbox3.Text = area 30 Compute Area of a Rectangle Length: Width: Area:
  • 31. ASSIGNMENT Declare variables for username and password as string Given: Username=“Admin” Password=“Pass123” Conditions: ◦ If the user entered correct username and password on textbox1 and textbox2, print on a messagebox “Welcome to Visual Basic” ◦ If the user entered incorrect username on textbox1, print on a messagebox “incorrect username” ◦ If the user entered incorrect password on textbox2, print on a messagebox “incorrect password” 31 LOG IN LOG IN FORM USERNAME: PASSWORD:
  • 32. Thank you Presenter name: Ellen Grace D. Porras Email address: egporras@psu.palawan.edu.ph