SlideShare a Scribd company logo
1 of 65
Creating a Quiz
Using Visual Basic
6.0
Ella Marie M. Wico
IV-Pope Pius IX
Objectives:
•Creating multiple Forms in
1 project.
Jargon Buster:
(Definition of Terms)

Progressbar is an animated
bar usually used to see if
there is a page that is to be
loaded.
Form is the start of the program
when the application is first run.
The Form looks like a blank
application window you see when
you open any Visual Basic
software program.
Timer executes code at
regular intervals by causing a
timer event to occur
PictureBox displays graphics
Form bitmap, icon, or
metafile, JPEG or GIF files
TextBox displays information
entered at design time,
entered by the user with a
toggle choice
If then Else, an IF block
statement is used to check
whether the logical test is true
or false. It will take the course
of action based on the result
retrieved on the logical test.
<Name of Form>.Show
allows the user to go
automatically to the next
question/Form
Me.Hide allows the user to
hide the current Form
Steps in
Making a Visual
Basic Game
Part I: User
Interface
Form 1 (Log In)
1. Open Visual Basic 6.0
portable and create a new
Standard EXE Project
2. First insert additional control in
the toolbox
2.1 Go to the Project Menu and
then choose Components.
2.2 On the Components dialog
box, choose the controls that are
needed in the program.
2.3 Choose Microsoft Windows
Common Controls 6.0
2.4 Click Apply and then
Close.
2.5 The Toolbox will have
additional controls like the picture
shown below.
3. Create this interface.
3.1 Drag the Form in the size
you want.
3.2 Change its Caption in the
Properties Window.
Change it into “Welcome to
Visual Basic Quiz”
3.3 Click the Picturebox in the
toolbox
3.4 Drag it into the size you
want.
3.5 In the Properties window,
select the picture you want in
you file. Then select it.
3.6 Click Label on the toolbox
3.7 Create a label and then change its
caption into “Name:”
3.8 Create another label and then
change its caption into “Section:”
3.9 Create a text box beside the two
labels.
3.10 Create a command button and
change its caption to “Enter”
4. Save your Form, CTRL +
S, create a folder wherein you
can save your files. In the
filename: name your 1st Form
as “frmlogin” then click
Save.
Form 2 (Loading)
1. Create
this
interface.
1.1 Set the backcolor of the Form to
black
1.2 Set the backstyle of label to
transparent and its forecolor to
white
1.3 On the Properties Window of
Timer, set the timer interval into
100.
.4 Click the
ProgressBar on
the Toolbox
2. Save your form, CTRL + S,
save your file in the folder that
you’ve made earlier. In the
filename: name your 2nd form
as “frmloading” then click
Save
Form 3 (Question 1)
1. Create this
interface
1.1 Click the PictureBox in
the toolbox
1.2 Drag it until it has the
same size as the form
1.3 Choose your desired
picture, and then select it.
1.4 Create a Frame and then
change its back color to blue
1.5 Change its Caption to
“Question # 1”
1.6 Create a label inside the
frame and change its Caption to
your desired question “This is
considered to be the lowest
level of programming
language”
1.7 Create a text box under it
1.8 Create a command button and
change its Caption into “Next
Question”
2. Save your form, CTRL + S, save
your file in the folder that you’ve
made earlier. In the filename:
name your 3rd form as
“frmquestion1” then click Save.
Form 4 (Question 2)
1. Create this
interface
And then repeat steps 1.1 to 1.7 on the
previous form.
1.8 Create a Command button and
change its Caption into “Result”
2. Save your form, CTRL + S, save your
file in the folder that you’ve made earlier.
In the filename: name your 4th form as
“frmquestion2” then click Save.
Form 5 (Result)
1. Create this
interface
1.1 Create a Frame
1.2 Inside the frame, add
labels naming: Name,
Section, Correct, and
Number of Items
1.3 Create a Command button
naming “Quit”
1.4 Save your form, CTRL + S,
save your file in the folder that
you’ve made earlier. In the
filename: name your 5th form as
“frmresult” then click Save.
Part II:
Coding
Form 1 (Log In)
1. Double click the Enter
command button, write these
codes
Private Sub cmdenter_Click()
If txtname.Text = "" Or txtsection.Text = "" Then
MsgBox "You need to fill up the fields needed!",
vbOKOnly + vbInformation, "Test"
Else
frmloading.Show
Me.Hide
frmresult.lblname.Caption = txtname.Text
frmresult.lblsection.Caption = txtsection.Text
End If
End Sub
2. Click CTRL+S to
save
Form 2 (Loading)
1. Double click the Timer,
write these codes
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 1
If ProgressBar1.Value = 10 Then
Label1.Caption = "Loading."
ElseIf ProgressBar1.Value = 20 Then
Label1.Caption = "Loading.."
ElseIf ProgressBar1.Value = 30 Then
Label1.Caption = "Loading..."
ElseIf ProgressBar1.Value = 40 Then
Label1.Caption = "Initializing."
ElseIf ProgressBar1.Value = 70 Then
Label1.Caption = "Please Wait."
ElseIf ProgressBar1.Value = 80 Then
Label1.Caption = "Please Wait.."
ElseIf ProgressBar1.Value = 90 Then
Label1.Caption = "Please Wait..."
ElseIf ProgressBar1.Value = 100 Then
Label1.Caption = "Successful!"
Timer1.Enabled = False
frmquestion1.Show
Me.Hide
End If
End Sub
2. Click CTRL+S to
save
Form 3 (Question 1)
1. Double-click the Next
Question Command
Button and enter these
codes
Private Sub Cmd1_Click()
If txtans1.Text = "Machine Language" Then
frmresult.LBLSCORE.Caption = Val(LBLSCORE) +
1
frmquestion2.Show
Me.Hide
ElseIf txtans1.Text <> "" Then
frmquestion2.Show
Me.Hide
End If
End Sub
2. Click CTRL+S to
save
Form 4 (Question 2)
1. Double-click the
Result Command
Button and enter these
codes
2. Click CTRL+S to
save
Form 5 (Result)
1. Double click the Quit
command button, enter
these codes below.
Command1
2. Click CTRL+S to
save
Part III:
Testing
1.Press F5 on your
keyboard to execute
your program
Saving
1. Go to the first form
2. Save the program as an
.EXE file (executable) from
the Menu bar, click File then
choose MakeProject1.exe
3. Name your executable file
as "Microsoft Visual Basic
Game" then save it to the
folder you created a while ago
The End

More Related Content

What's hot

C++ student management system
C++ student management systemC++ student management system
C++ student management systemABHIJITPATRA23
 
Library management (use case diagram Software engineering)
Library management (use case  diagram Software engineering)Library management (use case  diagram Software engineering)
Library management (use case diagram Software engineering)kiran Patel
 
Smart application for ams using face recognition
Smart application for ams using face recognitionSmart application for ams using face recognition
Smart application for ams using face recognitioncseij
 
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...Mumbai B.Sc.IT Study
 
Android activity
Android activityAndroid activity
Android activityKrazy Koder
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentationNoman Manzoor
 
ER diagrams for blood bank management system
ER diagrams for blood bank management systemER diagrams for blood bank management system
ER diagrams for blood bank management systemSoham Nanekar
 
Student management system project report c++
Student management system project report c++Student management system project report c++
Student management system project report c++Student
 
R2D2- Personal assistant on android.
R2D2- Personal assistant on android.R2D2- Personal assistant on android.
R2D2- Personal assistant on android.Mohd Nazim
 
Validation rule, validation text and input masks
Validation rule, validation text and input masksValidation rule, validation text and input masks
Validation rule, validation text and input masksfizahPhd
 
Bank management system
Bank management systemBank management system
Bank management systemMahmudul Hasan
 
Online Movie ticket booking Project
Online Movie ticket booking ProjectOnline Movie ticket booking Project
Online Movie ticket booking ProjectSHAZIA JAMALI
 
Library management system
Library management systemLibrary management system
Library management systemParesh Gosavi
 

What's hot (20)

ATM Banking
ATM BankingATM Banking
ATM Banking
 
C++ student management system
C++ student management systemC++ student management system
C++ student management system
 
Library management (use case diagram Software engineering)
Library management (use case  diagram Software engineering)Library management (use case  diagram Software engineering)
Library management (use case diagram Software engineering)
 
Smart application for ams using face recognition
Smart application for ams using face recognitionSmart application for ams using face recognition
Smart application for ams using face recognition
 
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
Advanced Web Programming (Question Paper) [October – 2018 | Choice Based Syll...
 
Android activity
Android activityAndroid activity
Android activity
 
Jsp tag library
Jsp tag libraryJsp tag library
Jsp tag library
 
Final year project presentation
Final year project presentationFinal year project presentation
Final year project presentation
 
Atm System
Atm SystemAtm System
Atm System
 
J2EE Introduction
J2EE IntroductionJ2EE Introduction
J2EE Introduction
 
ER diagrams for blood bank management system
ER diagrams for blood bank management systemER diagrams for blood bank management system
ER diagrams for blood bank management system
 
Student management system project report c++
Student management system project report c++Student management system project report c++
Student management system project report c++
 
R2D2- Personal assistant on android.
R2D2- Personal assistant on android.R2D2- Personal assistant on android.
R2D2- Personal assistant on android.
 
Validation rule, validation text and input masks
Validation rule, validation text and input masksValidation rule, validation text and input masks
Validation rule, validation text and input masks
 
Bank management system
Bank management systemBank management system
Bank management system
 
Wpf Introduction
Wpf IntroductionWpf Introduction
Wpf Introduction
 
Online Movie ticket booking Project
Online Movie ticket booking ProjectOnline Movie ticket booking Project
Online Movie ticket booking Project
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
Library management system
Library management systemLibrary management system
Library management system
 
JQuery selectors
JQuery selectors JQuery selectors
JQuery selectors
 

Viewers also liked

Visual Basic Codes And Screen Designs
Visual Basic Codes And Screen DesignsVisual Basic Codes And Screen Designs
Visual Basic Codes And Screen Designsprcastano
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)pbarasia
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computersimran153
 
Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Salim M
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programmingRoger Argarin
 
Online Quiz System Project PPT
Online Quiz System Project PPTOnline Quiz System Project PPT
Online Quiz System Project PPTShanthan Reddy
 
visual basic for the beginner
visual basic for the beginnervisual basic for the beginner
visual basic for the beginnerSalim M
 
Visual Basic Programming
Visual Basic ProgrammingVisual Basic Programming
Visual Basic ProgrammingOsama Yaseen
 
Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming francopw
 
Ordinante,Denver my online restobar
Ordinante,Denver my online restobarOrdinante,Denver my online restobar
Ordinante,Denver my online restobarraacl
 
Tilt All Day - Design Case Study
Tilt All Day - Design Case Study Tilt All Day - Design Case Study
Tilt All Day - Design Case Study Futuready Media
 
Introduction to Project Development using Visual Basic
Introduction to Project Development using Visual BasicIntroduction to Project Development using Visual Basic
Introduction to Project Development using Visual BasicMuralidharan Radhakrishnan
 
Introduction to automated visual testing
Introduction to automated visual testingIntroduction to automated visual testing
Introduction to automated visual testingadamcarmi
 

Viewers also liked (20)

Visual Basic Codes And Screen Designs
Visual Basic Codes And Screen DesignsVisual Basic Codes And Screen Designs
Visual Basic Codes And Screen Designs
 
Vb file
Vb fileVb file
Vb file
 
The Best Source Code VB
The Best Source Code VBThe Best Source Code VB
The Best Source Code VB
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
 
Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programming
 
Online Quiz System Project PPT
Online Quiz System Project PPTOnline Quiz System Project PPT
Online Quiz System Project PPT
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
visual basic for the beginner
visual basic for the beginnervisual basic for the beginner
visual basic for the beginner
 
Visual Basic Programming
Visual Basic ProgrammingVisual Basic Programming
Visual Basic Programming
 
Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Online quiz system
Online quiz systemOnline quiz system
Online quiz system
 
Ordinante,Denver my online restobar
Ordinante,Denver my online restobarOrdinante,Denver my online restobar
Ordinante,Denver my online restobar
 
Tilt All Day - Design Case Study
Tilt All Day - Design Case Study Tilt All Day - Design Case Study
Tilt All Day - Design Case Study
 
Introduction to Project Development using Visual Basic
Introduction to Project Development using Visual BasicIntroduction to Project Development using Visual Basic
Introduction to Project Development using Visual Basic
 
Ekonomiks
EkonomiksEkonomiks
Ekonomiks
 
Introduction to automated visual testing
Introduction to automated visual testingIntroduction to automated visual testing
Introduction to automated visual testing
 

Similar to Creating a quiz using visual basic 6

Cis 407 i lab 2 of 7
Cis 407 i lab 2 of 7Cis 407 i lab 2 of 7
Cis 407 i lab 2 of 7helpido9
 
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMSaraswathiRamalingam
 
06 win forms
06 win forms06 win forms
06 win formsmrjw
 
Cis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry universityCis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry universitylhkslkdh89009
 
The visual studio start page is shown in the figure below
The visual studio start page is shown in the figure belowThe visual studio start page is shown in the figure below
The visual studio start page is shown in the figure belowTan Ps
 
Gui builder
Gui builderGui builder
Gui builderlearnt
 
Technology and Livelihood Education IV
Technology and Livelihood Education IVTechnology and Livelihood Education IV
Technology and Livelihood Education IVKenneth Osabal
 
Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017khawagah
 
PT1420 File Access and Visual Basic .docx
PT1420 File Access and Visual Basic                      .docxPT1420 File Access and Visual Basic                      .docx
PT1420 File Access and Visual Basic .docxamrit47
 
Chapter2.ppt
Chapter2.pptChapter2.ppt
Chapter2.pptLalRatan
 
MICROSOFT ACCESS (ICTL)
MICROSOFT ACCESS (ICTL)MICROSOFT ACCESS (ICTL)
MICROSOFT ACCESS (ICTL)Nad0209
 
Form4 cd4
Form4 cd4Form4 cd4
Form4 cd4smktsj2
 

Similar to Creating a quiz using visual basic 6 (20)

Cis 407 i lab 2 of 7
Cis 407 i lab 2 of 7Cis 407 i lab 2 of 7
Cis 407 i lab 2 of 7
 
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAMPROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
PROGRAMMING USING C#.NET SARASWATHI RAMALINGAM
 
Create our own keylogger
Create our own keyloggerCreate our own keylogger
Create our own keylogger
 
Create our own keylogger
Create our own keyloggerCreate our own keylogger
Create our own keylogger
 
Visual C# 2010
Visual C# 2010Visual C# 2010
Visual C# 2010
 
06 win forms
06 win forms06 win forms
06 win forms
 
Cis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry universityCis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry university
 
The visual studio start page is shown in the figure below
The visual studio start page is shown in the figure belowThe visual studio start page is shown in the figure below
The visual studio start page is shown in the figure below
 
Visualbasic tutorial
Visualbasic tutorialVisualbasic tutorial
Visualbasic tutorial
 
Gui builder
Gui builderGui builder
Gui builder
 
Technology and Livelihood Education IV
Technology and Livelihood Education IVTechnology and Livelihood Education IV
Technology and Livelihood Education IV
 
Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017
 
Lab1
Lab1Lab1
Lab1
 
PT1420 File Access and Visual Basic .docx
PT1420 File Access and Visual Basic                      .docxPT1420 File Access and Visual Basic                      .docx
PT1420 File Access and Visual Basic .docx
 
Chapter2.ppt
Chapter2.pptChapter2.ppt
Chapter2.ppt
 
Intake 38 9
Intake 38 9Intake 38 9
Intake 38 9
 
MICROSOFT ACCESS (ICTL)
MICROSOFT ACCESS (ICTL)MICROSOFT ACCESS (ICTL)
MICROSOFT ACCESS (ICTL)
 
Introduction
IntroductionIntroduction
Introduction
 
Form4 cd4
Form4 cd4Form4 cd4
Form4 cd4
 
Intake 37 9
Intake 37 9Intake 37 9
Intake 37 9
 

Recently uploaded

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 

Recently uploaded (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 

Creating a quiz using visual basic 6

  • 1. Creating a Quiz Using Visual Basic 6.0 Ella Marie M. Wico IV-Pope Pius IX
  • 3. Jargon Buster: (Definition of Terms) Progressbar is an animated bar usually used to see if there is a page that is to be loaded.
  • 4. Form is the start of the program when the application is first run. The Form looks like a blank application window you see when you open any Visual Basic software program.
  • 5. Timer executes code at regular intervals by causing a timer event to occur
  • 6. PictureBox displays graphics Form bitmap, icon, or metafile, JPEG or GIF files
  • 7. TextBox displays information entered at design time, entered by the user with a toggle choice
  • 8. If then Else, an IF block statement is used to check whether the logical test is true or false. It will take the course of action based on the result retrieved on the logical test.
  • 9. <Name of Form>.Show allows the user to go automatically to the next question/Form
  • 10. Me.Hide allows the user to hide the current Form
  • 11. Steps in Making a Visual Basic Game
  • 13. Form 1 (Log In) 1. Open Visual Basic 6.0 portable and create a new Standard EXE Project
  • 14. 2. First insert additional control in the toolbox 2.1 Go to the Project Menu and then choose Components. 2.2 On the Components dialog box, choose the controls that are needed in the program.
  • 15.
  • 16. 2.3 Choose Microsoft Windows Common Controls 6.0 2.4 Click Apply and then Close. 2.5 The Toolbox will have additional controls like the picture shown below.
  • 17.
  • 18. 3. Create this interface.
  • 19. 3.1 Drag the Form in the size you want. 3.2 Change its Caption in the Properties Window. Change it into “Welcome to Visual Basic Quiz”
  • 20.
  • 21. 3.3 Click the Picturebox in the toolbox 3.4 Drag it into the size you want. 3.5 In the Properties window, select the picture you want in you file. Then select it.
  • 22.
  • 23. 3.6 Click Label on the toolbox 3.7 Create a label and then change its caption into “Name:” 3.8 Create another label and then change its caption into “Section:” 3.9 Create a text box beside the two labels. 3.10 Create a command button and change its caption to “Enter”
  • 24. 4. Save your Form, CTRL + S, create a folder wherein you can save your files. In the filename: name your 1st Form as “frmlogin” then click Save.
  • 25. Form 2 (Loading) 1. Create this interface.
  • 26. 1.1 Set the backcolor of the Form to black 1.2 Set the backstyle of label to transparent and its forecolor to white 1.3 On the Properties Window of Timer, set the timer interval into 100.
  • 27.
  • 28. .4 Click the ProgressBar on the Toolbox
  • 29. 2. Save your form, CTRL + S, save your file in the folder that you’ve made earlier. In the filename: name your 2nd form as “frmloading” then click Save
  • 30. Form 3 (Question 1) 1. Create this interface
  • 31. 1.1 Click the PictureBox in the toolbox 1.2 Drag it until it has the same size as the form 1.3 Choose your desired picture, and then select it.
  • 32.
  • 33. 1.4 Create a Frame and then change its back color to blue 1.5 Change its Caption to “Question # 1”
  • 34.
  • 35. 1.6 Create a label inside the frame and change its Caption to your desired question “This is considered to be the lowest level of programming language” 1.7 Create a text box under it
  • 36. 1.8 Create a command button and change its Caption into “Next Question” 2. Save your form, CTRL + S, save your file in the folder that you’ve made earlier. In the filename: name your 3rd form as “frmquestion1” then click Save.
  • 37. Form 4 (Question 2) 1. Create this interface
  • 38. And then repeat steps 1.1 to 1.7 on the previous form. 1.8 Create a Command button and change its Caption into “Result” 2. Save your form, CTRL + S, save your file in the folder that you’ve made earlier. In the filename: name your 4th form as “frmquestion2” then click Save.
  • 39. Form 5 (Result) 1. Create this interface
  • 40. 1.1 Create a Frame 1.2 Inside the frame, add labels naming: Name, Section, Correct, and Number of Items
  • 41. 1.3 Create a Command button naming “Quit” 1.4 Save your form, CTRL + S, save your file in the folder that you’ve made earlier. In the filename: name your 5th form as “frmresult” then click Save.
  • 43. Form 1 (Log In) 1. Double click the Enter command button, write these codes
  • 44. Private Sub cmdenter_Click() If txtname.Text = "" Or txtsection.Text = "" Then MsgBox "You need to fill up the fields needed!", vbOKOnly + vbInformation, "Test" Else frmloading.Show Me.Hide frmresult.lblname.Caption = txtname.Text frmresult.lblsection.Caption = txtsection.Text End If End Sub
  • 45. 2. Click CTRL+S to save
  • 46. Form 2 (Loading) 1. Double click the Timer, write these codes
  • 47. Private Sub Timer1_Timer() ProgressBar1.Value = ProgressBar1.Value + 1 If ProgressBar1.Value = 10 Then Label1.Caption = "Loading." ElseIf ProgressBar1.Value = 20 Then Label1.Caption = "Loading.." ElseIf ProgressBar1.Value = 30 Then Label1.Caption = "Loading..." ElseIf ProgressBar1.Value = 40 Then Label1.Caption = "Initializing."
  • 48. ElseIf ProgressBar1.Value = 70 Then Label1.Caption = "Please Wait." ElseIf ProgressBar1.Value = 80 Then Label1.Caption = "Please Wait.." ElseIf ProgressBar1.Value = 90 Then Label1.Caption = "Please Wait..." ElseIf ProgressBar1.Value = 100 Then Label1.Caption = "Successful!" Timer1.Enabled = False frmquestion1.Show Me.Hide End If End Sub
  • 49. 2. Click CTRL+S to save
  • 50. Form 3 (Question 1) 1. Double-click the Next Question Command Button and enter these codes
  • 51. Private Sub Cmd1_Click() If txtans1.Text = "Machine Language" Then frmresult.LBLSCORE.Caption = Val(LBLSCORE) + 1 frmquestion2.Show Me.Hide ElseIf txtans1.Text <> "" Then frmquestion2.Show Me.Hide End If End Sub
  • 52. 2. Click CTRL+S to save
  • 53. Form 4 (Question 2) 1. Double-click the Result Command Button and enter these codes
  • 54.
  • 55. 2. Click CTRL+S to save
  • 56. Form 5 (Result) 1. Double click the Quit command button, enter these codes below.
  • 58. 2. Click CTRL+S to save
  • 60. 1.Press F5 on your keyboard to execute your program
  • 62. 1. Go to the first form
  • 63. 2. Save the program as an .EXE file (executable) from the Menu bar, click File then choose MakeProject1.exe
  • 64. 3. Name your executable file as "Microsoft Visual Basic Game" then save it to the folder you created a while ago