GUI Micro Project
GUI Micro Project
GUI Micro Project
On
1) Karan Pagar
2) Chaitanya Dole
3) Viraj Nimbalkar
4) Arpan Patil
Name of guide
In partial fulfillment of
May 2022
PUNE – 411038
Affiliated to
1
MAHARASHTRA STATE
Certificate
This is to certify that Mr. Karan Pagar Roll No.19 of 4th Semester of Diploma in Information
Technology of Institute: MAEER’s MIT Polytechnic Pune (Code:0148) has completed the
Micro Project satisfactorily in Subject GUI Application Development Using VB.Net for the
academic year 2021- 2022 as prescribed in the curriculum.
Institute
Seal
2
MAHARASHTRA STATE
Certificate
This is to certify that Mr. Chaitanya Dole Roll No. 27 of 4th Semester of Diploma in
Information Technology of Institute: MAEER’s MIT Polytechnic Pune (Code:0148) has
completed the Micro Project satisfactorily in Subject GUI Application Development Using
VB.Net For the academic year 2021- 2022 as prescribed in the curriculum.
Institute
Seal
3
MAHARASHTRA STATE
Certificate
This is to certify that Mr. Viraj Nimbalkar Roll No.33 of 4th Semester of Diploma in
Information Technology of Institute: MAEER’s MIT Polytechnic Pune (Code:0148) has
completed the Micro Project satisfactorily in Subject GUI Application Development Using
VB.Net for the academic year 2021- 2022 as prescribed in the curriculum.
Institute
Seal
4
MAHARASHTRA STATE
Certificate
This is to certify that Mr. Arpan Patil Roll No.44 of 4th Semester of Diploma in Information
Technology of Institute: MAEER’s MIT Polytechnic Pune (Code:0148) has completed the
Micro Project satisfactorily in Subject GUI Application Development Using VB.Net for the
academic year 2021- 2022 as prescribed in the curriculum.
Institute
Seal
5
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
6
Index
2 Code 10-14
3 output 15
4 ANEEXURE I 16-17
7
1. Action Plan :
No.
01 Laptop I3,I5
03 MS Word 2019
04 Internet
8
➢Introduction :-
9
➢ Code :-
➢ Public Class Form1
➢ Dim checkforXorO As Boolean = False
➢ Dim addOnetoscore As Integer = 0
➢
➢ Sub buttonEnabledFalse()
➢ 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
➢
➢ Sub checkforWin()
➢ If Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X"
Then
➢ Button1.BackColor = Color.Black
➢ Button2.BackColor = Color.Black
➢ Button3.BackColor = Color.Black
➢ MessageBox.Show("Winner is player X", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerX.text)
➢ LabelPlayerX.text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X"
Then
➢ Button4.BackColor = Color.Black
➢ Button5.BackColor = Color.Black
➢ Button6.BackColor = Color.Black
➢ MessageBox.Show("Winner is player X", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerX.text)
➢ LabelPlayerX.text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X"
Then
➢ Button7.BackColor = Color.Black
➢ Button8.BackColor = Color.Black
➢ Button9.BackColor = Color.Black
➢ MessageBox.Show("Winner is player X", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerX.text)
➢ LabelPlayerX.text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X"
Then
➢ Button1.BackColor = Color.Black
➢ Button4.BackColor = Color.Black
➢ Button7.BackColor = Color.Black
10
➢ MessageBox.Show("Winner is player X", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerX.text)
➢ LabelPlayerX.text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X"
Then
➢ Button2.BackColor = Color.Black
➢ Button5.BackColor = Color.Black
➢ Button8.BackColor = Color.Black
➢ MessageBox.Show("Winner is player X", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerX.text)
➢ LabelPlayerX.text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X"
Then
➢ Button3.BackColor = Color.Black
➢ Button6.BackColor = Color.Black
➢ Button9.BackColor = Color.Black
➢ MessageBox.Show("Winner is player X", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerX.text)
➢ LabelPlayerX.text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X"
Then
➢ Button1.BackColor = Color.Black
➢ Button5.BackColor = Color.Black
➢ Button9.BackColor = Color.Black
➢ MessageBox.Show("Winner is player X", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerX.text)
➢ LabelPlayerX.text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X"
Then
➢ Button3.BackColor = Color.Black
➢ Button5.BackColor = Color.Black
➢ Button7.BackColor = Color.Black
➢ MessageBox.Show("Winner is player X", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerX.text)
➢ LabelPlayerX.text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ 'O combination
➢ If Button1.Text = "O" And Button2.Text = "O" And Button3.Text = "O"
Then
➢ Button1.BackColor = Color.Black
➢ Button2.BackColor = Color.Black
➢ Button3.BackColor = Color.Black
➢ MessageBox.Show("Winner is player O", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerO.Text)
➢ LabelPlayerO.Text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
11
➢ End If
➢ If Button4.Text = "O" And Button5.Text = "O" And Button6.Text = "O"
Then
➢ Button4.BackColor = Color.Black
➢ Button5.BackColor = Color.Black
➢ Button6.BackColor = Color.Black
➢ MessageBox.Show("Winner is player O", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerO.Text)
➢ LabelPlayerO.Text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button7.Text = "O" And Button8.Text = "O" And Button9.Text = "O"
Then
➢ Button7.BackColor = Color.Black
➢ Button8.BackColor = Color.Black
➢ Button9.BackColor = Color.Black
➢ MessageBox.Show("Winner is player O", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerO.Text)
➢ LabelPlayerO.Text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button1.Text = "O" And Button4.Text = "O" And Button7.Text = "O"
Then
➢ Button1.BackColor = Color.Black
➢ Button4.BackColor = Color.Black
➢ Button7.BackColor = Color.Black
➢ MessageBox.Show("Winner is player O", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerO.Text)
➢ LabelPlayerO.Text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button2.Text = "O" And Button5.Text = "O" And Button8.Text = "O"
Then
➢ Button2.BackColor = Color.Black
➢ Button5.BackColor = Color.Black
➢ Button8.BackColor = Color.Black
➢ MessageBox.Show("Winner is player O", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerO.Text)
➢ LabelPlayerO.Text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button3.Text = "O" And Button6.Text = "O" And Button9.Text = "O"
Then
➢ Button3.BackColor = Color.Black
➢ Button6.BackColor = Color.Black
➢ Button9.BackColor = Color.Black
➢ MessageBox.Show("Winner is player O", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerO.Text)
➢ LabelPlayerO.Text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button1.Text = "O" And Button5.Text = "O" And Button9.Text = "O"
Then
➢ Button1.BackColor = Color.Black
➢ Button5.BackColor = Color.Black
➢ Button9.BackColor = Color.Black
12
➢ MessageBox.Show("Winner is player O", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerO.Text)
➢ LabelPlayerO.Text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ If Button3.Text = "O" And Button5.Text = "O" And Button7.Text = "O"
Then
➢ Button3.BackColor = Color.Black
➢ Button5.BackColor = Color.Black
➢ Button7.BackColor = Color.Black
➢ MessageBox.Show("Winner is player O", "Tic Tac Toe",
MessageBoxButtons.OK, MessageBoxIcon.Information)
➢ addOnetoscore = Convert.ToInt64(LabelPlayerO.Text)
➢ LabelPlayerO.Text = Convert.ToString(addOnetoscore + 1)
➢ buttonEnabledFalse()
➢ End If
➢ End Sub
➢
➢ Private Sub Button_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button9.Click, Button8.Click, Button7.Click,
Button6.Click, Button5.Click, Button4.Click, Button3.Click, Button2.Click,
Button1.Click
➢ Dim b As Button = sender
➢ If checkforXorO = False Then
➢ b.Text = "X"
➢ checkforXorO = True
➢ Else
➢ b.Text = "O"
➢ checkforXorO = False
➢ End If
➢ checkforWin()
➢ b.Enabled = False
➢
➢ End Sub
➢
➢ Private Sub ButtonReset_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ButtonReset.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 = ""
➢ Button8.Text = ""
➢ Button9.Text = ""
➢
➢ Button1.BackColor = Color.White
➢ Button2.BackColor = Color.White
➢ Button3.BackColor = Color.White
13
➢ Button4.BackColor = Color.White
➢ Button5.BackColor = Color.White
➢ Button6.BackColor = Color.White
➢ Button7.BackColor = Color.White
➢ Button8.BackColor = Color.White
➢ Button9.BackColor = Color.White
➢ End Sub
➢
➢ Private Sub ButtonNewGame_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ButtonNewGame.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 = ""
➢ Button8.Text = ""
➢ Button9.Text = ""
➢
➢ Button1.BackColor = Color.White
➢ Button2.BackColor = Color.White
➢ Button3.BackColor = Color.White
➢ Button4.BackColor = Color.White
➢ Button5.BackColor = Color.White
➢ Button6.BackColor = Color.White
➢ Button7.BackColor = Color.White
➢ Button8.BackColor = Color.White
➢ Button9.BackColor = Color.White
➢
➢ LabelPlayerX.Text = "0"
➢ LabelPlayerO.Text = "0"
➢
➢
➢ End Sub
➢
➢ Private Sub ButtonExit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ButtonExit.Click
➢ Dim checkforexit As DialogResult = MessageBox.Show("Confirm if you want
to exit", "Tic Tac Toe", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
➢ If checkforexit = DialogResult.Yes Then
➢ Application.Exit()
➢
➢ End If
➢ End Sub
➢ End Class
➢
14
➢ OutPut:-
15
ANEEXURE I
➢ Course Outcomes :-
Working of Tic Tac Toe Mini VB.NET Project
As soon as a button is clicked the button changes its color. When one
player succeeds in drawing three consecutive buttons
(row/column/diagonal) with his assigned color he is declared a
winner
16
➢ Project outcomes and Result:
19 Karan Pagar
27 Chaitanya Dole
33 Viraj
Nimbalkar
44 Arpan Patil
17
18
19