0% found this document useful (0 votes)
4 views23 pages

GAD04

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)
4 views23 pages

GAD04

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/ 23

Maharashtra Board of Technical Education,

Mumbai

GOVERNMENT POLYTECHNIC, SOLAPUR

DIPLOMA IN COMPUTER TECHNOLOGY


Academic year 2023-24

GAD(22034)

A
MICRO-PROJECT
ON

“Tic Tac Toe Using Vb.Net ”

Submitted by:

Roll Name Enrollment no Seat No


no
04 Anjali Y Durgam 2200150094 168431

Submitted to:

Miss. Varsha Mangalaram Ma’am.

1
CERTIFICATE

This is to certify that the following student Anjali Yadgiri

Durgam, Roll No. 04 of Branch CM4I of the institute Government

Polytechnic, Solapur (0015) has completed the micro-project work

satisfactorily under my supervision/guidance for the subject

GAD(22034) in the academic year 2023-2024 as prescribed in the

curriculum.

Guide Name – Miss. Varsha Mangalaram Ma’am.

Date & Sign –

HOD PRINCIPAL

2
INDEX

Sr.No Page
Title
. No.
1. Acknowledgement 4
2. Abstract 5
3. Introduction 6
4. Computer System Used 7
Code 8-18
5. Program
Output 19-21
6. Conclusion 22
7. Reference 23

3
ACKNOWLEDGEMENT

In the accomplishment of this micro-project successfully,


many people have best owned upon me their blessings and
heart-privileged support. Primarily, I would like to express a
special thanks of gratitude to the Principal of the Government
Polytechnic, Solapur for giving this golden opportunity with all
the required facilities for completing this micro-project of our
group.

I would like to extend my gratitude to our sir, whose valuable


guidance has been the ones that helped us patch this project
and make it full proof success. Their suggestions and instructions
have served as the major contributor towards the completion of
the micro-project.

I would also like to thank my parents who have helped with their
valuable suggestions and provided the required resources
needed for the micro-project.

4
ABSTRACT

The purpose of the Micro-project is develop new skills


individual and enhance this skill by using it at industry level.
A Graphical User Interface (GUI) is a digital interface inwhich a
user interacts with graphical components such as icons, buttons,
and menus. In a GUI, the visuals displayed in the user interface
convey information relevant to the user,as well as actions that
they can take.

In this project, I’ve created a Tic Tac Toe game GUI interface
using Vb.net language by applying coding and drag and drop
methods.

5
INTRODUCTION
A Graphical User Interface (GUI) is a digital interface in
which a user interacts with graphical components such as icons,
buttons, and menus. In a GUI, the visuals displayed in the user
interface convey information relevant to the user, as well as
actions that they can take.

This microproject highlights the course outcome todevelop


GUI Application using Form Controls Using Vb.net. I have
basically made a interesting game using different controls.

This microproject is made in such a way that it is user friendly


and easy to navigate between all the functions of the vb.net.

6
SIGNIFICANCE OF PROJECT

First I’ve have created Tic Tac Toe game. I’vehave used various
websites so as to gather the information of gui applications and
applied them in our project as per the project requirement and
use.

SCOPE OF PROJECT

I’ve developed the project such that the Tic Tac Toe game . In
this game two players plays the game. For ex. Player 1 and
Player2.

SOFTWARE REQUIREMENTS USED

1.Operating System Windows11

2.Web browsers.

HARDWARE EQUIPMENTS

1. Personal laptop.

2. 8GB RAM Windows-11 intel i5

7
PROGRAM CODE
Public Class Form1

Dim checker As Boolean


Dim plusone As Integer

Private Sub enable_false()


Button1.Enabled = False
Button2.Enabled = False
Button3.Enabled = False
Button4.Enabled = False
Button5.Enabled = False
Button6.Enabled = False
Button7.Enabled = False
Button8.Enabled = False
Button9.Enabled = False
End Sub
Private Sub score()
If (Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X") Then
Button1.BackColor = System.Drawing.Color.PowderBlue
Button2.BackColor = Color.PowderBlue
Button3.BackColor = System.Drawing.Color.PowderBlue
MessageBox.Show("The Winner is Player X", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "WINNER"
Label4.Text = "LOOSER"
enable_false()
End If

If (Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X") Then


Button1.BackColor = System.Drawing.Color.Pink
Button4.BackColor = System.Drawing.Color.Pink
Button7.BackColor = System.Drawing.Color.Pink
MessageBox.Show("The Winner is Player X", "TIC TAC TOE", MessageBoxButtons.OK,
8
MessageBoxIcon.Information)
Label3.Text = "WINNER"
Label4.Text = "LOOSER"
enable_false()
End If

If (Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X") Then


Button1.BackColor = System.Drawing.Color.Crimson
Button5.BackColor = System.Drawing.Color.Crimson
Button9.BackColor = System.Drawing.Color.Crimson
MessageBox.Show("The Winner is Player X", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "WINNER"
Label4.Text = "LOOSER"
enable_false()
End If

If (Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X") Then


Button3.BackColor = System.Drawing.Color.Pink
Button5.BackColor = System.Drawing.Color.Pink
Button7.BackColor = System.Drawing.Color.Pink
MessageBox.Show("The Winner is Player X", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "WINNER"
Label4.Text = "LOOSER"
enable_false()
End If

If (Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X") Then


Button2.BackColor = System.Drawing.Color.Crimson
Button5.BackColor = System.Drawing.Color.Crimson
Button8.BackColor = System.Drawing.Color.Crimson
MessageBox.Show("The Winner is Player X", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "WINNER"
Label4.Text = "LOOSER"
9
enable_false()
End If

If (Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X") Then


Button3.BackColor = System.Drawing.Color.Pink
Button6.BackColor = System.Drawing.Color.Pink
Button9.BackColor = System.Drawing.Color.Pink
MessageBox.Show("The Winner is Player X", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "WINNER"
Label4.Text = "LOOSER"
enable_false()
End If

If (Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X") Then


Button4.BackColor = System.Drawing.Color.Crimson
Button5.BackColor = System.Drawing.Color.Crimson
Button6.BackColor = System.Drawing.Color.Crimson
MessageBox.Show("The Winner is Player X", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "WINNER"
Label4.Text = "LOOSER"
enable_false()
End If

If (Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X") Then


Button7.BackColor = System.Drawing.Color.Pink
Button8.BackColor = System.Drawing.Color.Pink
Button9.BackColor = System.Drawing.Color.Pink
MessageBox.Show("The Winner is Player X", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "WINNER"
Label4.Text = "LOOSER"
enable_false()
End If

If (Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O") Then


10
Button1.BackColor = System.Drawing.Color.PowderBlue
Button2.BackColor = Color.PowderBlue
Button3.BackColor = System.Drawing.Color.PowderBlue
MessageBox.Show("The Winner is Player O", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "LOOSER"
Label4.Text = "WINNER"
enable_false()
End If

If (Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O") Then


Button4.BackColor = System.Drawing.Color.Pink
Button7.BackColor = System.Drawing.Color.Pink
Button3.BackColor = System.Drawing.Color.Pink
MessageBox.Show("The Winner is Player O", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "LOOSER"
Label4.Text = "WINNER"
enable_false()
End If
If (Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "O") Then
Button1.BackColor = System.Drawing.Color.Crimson
Button5.BackColor = System.Drawing.Color.Crimson
Button9.BackColor = System.Drawing.Color.Crimson
MessageBox.Show("The Winner is Player O", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "LOOSER"
Label4.Text = "WINNER"
enable_false()
End If
If (Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O") Then
Button3.BackColor = System.Drawing.Color.Pink
Button5.BackColor = System.Drawing.Color.Pink
Button7.BackColor = System.Drawing.Color.Pink
MessageBox.Show("The Winner is Player O", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "LOOSER"
11
Label4.Text = "WINNER"
enable_false()
End If

If (Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O") Then


Button8.BackColor = System.Drawing.Color.Crimson
Button2.BackColor = System.Drawing.Color.Crimson
Button5.BackColor = System.Drawing.Color.Crimson
MessageBox.Show("The Winner is Player O", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "LOOSER"
Label4.Text = "WINNER"
enable_false()
End If

If (Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O") Then


Button9.BackColor = System.Drawing.Color.Pink
Button6.BackColor = System.Drawing.Color.Pink
Button3.BackColor = System.Drawing.Color.Pink
MessageBox.Show("The Winner is Player O", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "LOOSER"
Label4.Text = "WINNER"
enable_false()
End If

If (Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O") Then


Button4.BackColor = System.Drawing.Color.Crimson
Button5.BackColor = System.Drawing.Color.Crimson
Button6.BackColor = System.Drawing.Color.Crimson
MessageBox.Show("The Winner is Player O", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "LOOSER"
Label4.Text = "WINNER"
enable_false()
End If

12
If (Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O") Then
Button7.BackColor = System.Drawing.Color.Pink
Button8.BackColor = System.Drawing.Color.Pink
Button9.BackColor = System.Drawing.Color.Pink
MessageBox.Show("The Winner is Player O", "TIC TAC TOE", MessageBoxButtons.OK,
MessageBoxIcon.Information)
Label3.Text = "LOOSER"
Label4.Text = "WINNER"
enable_false()
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If (checker = False) Then
Button1.Text = "X"
checker = True
Else
Button1.Text = "O"
checker = False
End If
score()
Button1.Enabled = False
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


If (checker = False) Then
Button2.Text = "X"
checker = True

Else
Button2.Text = "O"
checker = False
End If
score()
Button2.Enabled = False
End Sub

13
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If (checker = False) Then
Button3.Text = "X"
checker = True

Else
Button3.Text = "O"
checker = False
End If
score()
Button3.Enabled = False
End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click


If (checker = False) Then
Button4.Text = "X"
checker = True

Else
Button4.Text = "O"
checker = False
End If
score()
Button4.Enabled = False
End Sub

Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click


If (checker = False) Then
Button5.Text = "X"
checker = True

Else
Button5.Text = "O"
checker = False
End If
score()
14
Button5.Enabled = False
End Sub

Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click


If (checker = False) Then
Button6.Text = "X"
checker = True

Else
Button6.Text = "O"
checker = False
End If
score()
Button6.Enabled = False
End Sub

Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click


If (checker = False) Then
Button7.Text = "X"
checker = True

Else
Button7.Text = "O"
checker = False
End If
score()
Button7.Enabled = False
End Sub

Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click


If (checker = False) Then
Button8.Text = "X"
checker = True

Else
Button8.Text = "O"
15
checker = False
End If
score()
Button8.Enabled = False
End Sub

Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click


If (checker = False) Then
Button9.Text = "X"
checker = True

Else
Button9.Text = "O"
checker = False
End If
score()
Button9.Enabled = False
End Sub

Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click


Button1.Enabled = True
Button2.Enabled = True
Button3.Enabled = True
Button4.Enabled = True
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
Button8.Enabled = True
Button9.Enabled = True

Button1.Text = ""
Button2.Text = ""
Button3.Text = ""
Button4.Text = ""
Button5.Text = ""
Button6.Text = ""
16
Button7.Text = ""
Button8.Text = ""
Button9.Text = ""

Label3.Text = ""
Label4.Text = ""

Button1.BackColor = System.Drawing.Color.WhiteSmoke
Button2.BackColor = Color.WhiteSmoke
Button3.BackColor = Color.WhiteSmoke
Button4.BackColor = Color.WhiteSmoke
Button5.BackColor = Color.WhiteSmoke
Button6.BackColor = Color.WhiteSmoke
Button7.BackColor = Color.WhiteSmoke
Button8.BackColor = Color.WhiteSmoke
Button9.BackColor = Color.WhiteSmoke
End Sub

Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click


Button1.Enabled = True
Button2.Enabled = True
Button3.Enabled = True
Button4.Enabled = True
Button5.Enabled = True
Button6.Enabled = True
Button7.Enabled = True
Button8.Enabled = True
Button9.Enabled = True

Button1.Text = ""
Button2.Text = ""
Button3.Text = ""
Button4.Text = ""
Button5.Text = ""
Button6.Text = ""
Button7.Text = ""
17
Button8.Text = ""
Button9.Text = ""

Button12.Enabled = True

Button1.BackColor = System.Drawing.Color.WhiteSmoke
Button2.BackColor = Color.WhiteSmoke
Button3.BackColor = Color.WhiteSmoke
Button4.BackColor = Color.WhiteSmoke
Button5.BackColor = Color.WhiteSmoke
Button6.BackColor = Color.WhiteSmoke
Button7.BackColor = Color.WhiteSmoke
Button8.BackColor = Color.WhiteSmoke
Button9.BackColor = Color.WhiteSmoke

Label3.Text = ""
Label4.Text = ""
End Sub

Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click


Dim exiting As DialogResult

exiting = MessageBox.Show("Confirm if you want to exit.", "TIC TAC TOE", MessageBoxButtons.YesNo,


MessageBoxIcon.Question)
If exiting = DialogResult.Yes Then
Application.Exit()
End If
End Sub
End Class

18
OUTPUT

19
20
21
CONCLUSION

The main course outcome behind this micro-project was


to develop the GUI application using Form Controls using Vb.net.
Hence completing this micro-project, we think that this course
outcome is successfully achieved.This microproject mainly shows
us how to implementVB.net functions into real world and how to
utilize them perfectly.VB.net supports many classes and properties
but utilizing those properties correctly to get required output is
important.

This project was helpful increasing vocabulary in the classes and


properties we know in this language.

22
REFERENCES

 www.google.com
 www.youtube.com
 www.tutorialspoint.com
 www.generalnote.com
 www.programiz.com

23

You might also like