Public Class Form1 Dim tic As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load tic = 1 End Sub Private Sub win() If Button1.Text = "X" And Button2.Text = "X" And Button3.Text = "X" Then MsgBox("Jucatorul X a castigat!!!!!", MsgBoxStyle.OkCancel) Label6.Text += 1 Button10.Enabled = True ElseIf Button4.Text = "X" And Button5.Text = "X" And Button6.Text = "X" Then MsgBox("Jucatorul X a castigat!!!!!", MsgBoxStyle.OkCancel) Label6.Text += 1 Button10.Enabled = True ElseIf Button7.Text = "X" And Button8.Text = "X" And Button9.Text = "X" Then MsgBox("Jucatorul X a castigat!!!!!", MsgBoxStyle.OkCancel) Label6.Text += 1 Button10.Enabled = True ElseIf Button1.Text = "X" And Button4.Text = "X" And Button7.Text = "X" Then MsgBox("Jucatorul X a castigat!!!!!", MsgBoxStyle.OkCancel) Label6.Text += 1 Button10.Enabled = True ElseIf Button2.Text = "X" And Button5.Text = "X" And Button8.Text = "X" Then MsgBox("Jucatorul X a castigat!!!!!", MsgBoxStyle.OkCancel) Label6.Text += 1 Button10.Enabled = True ElseIf Button3.Text = "X" And Button6.Text = "X" And Button9.Text = "X" Then MsgBox("Jucatorul X a castigat!!!!!", MsgBoxStyle.OkCancel) Label6.Text += 1 Button10.Enabled = True ElseIf Button1.Text = "X" And Button5.Text = "X" And Button9.Text = "X" Then MsgBox("Jucatorul X a castigat!!!!!", MsgBoxStyle.OkCancel) Label6.Text += 1 Button10.Enabled = True ElseIf Button3.Text = "X" And Button5.Text = "X" And Button7.Text = "X" Then MsgBox("Jucatorul X a castigat!!!!!", MsgBoxStyle.OkCancel) Label6.Text += 1 Button10.Enabled = True End If ' ok acu cu 0 If Button1.Text = "0" And Button2.Text = "0" And Button3.Text = "0" Then MsgBox("Jucatorul 0 a castigat!!!!!", MsgBoxStyle.OkCancel) Label7.Text += 1 Button10.Enabled = True ElseIf Button4.Text = "0" And Button5.Text = "0" And Button6.Text = "0" Then MsgBox("Jucatorul 0 a castigat!!!!!", MsgBoxStyle.OkCancel) Label7.Text += 1 Button10.Enabled = True ElseIf Button7.Text = "0" And Button8.Text = "0" And Button9.Text = "0" Then MsgBox("Jucatorul 0 a castigat!!!!!", MsgBoxStyle.OkCancel) Label7.Text += 1 Button10.Enabled = True ElseIf Button1.Text = "0" And Button4.Text = "0" And Button7.Text = "0" Then MsgBox("Jucatorul 0 a castigat!!!!!", MsgBoxStyle.OkCancel) Label7.Text += 1 Button10.Enabled = True ElseIf Button2.Text = "0" And Button5.Text = "0" And Button8.Text = "0" Then MsgBox("Jucatorul 0 a castigat!!!!!", MsgBoxStyle.OkCancel) Label7.Text += 1 Button10.Enabled = True ElseIf Button3.Text = "0" And Button6.Text = "0" And Button9.Text = "0" Then MsgBox("Jucatorul 0 a castigat!!!!!", MsgBoxStyle.OkCancel) Label7.Text += 1 Button10.Enabled = True ElseIf Button1.Text = "0" And Button5.Text = "0" And Button9.Text = "0" Then MsgBox("Jucatorul 0 a castigat!!!!!", MsgBoxStyle.OkCancel) Label7.Text += 1 ElseIf Button3.Text = "0" And Button5.Text = "0" And Button7.Text = "0" Then MsgBox("Jucatorul 0 a castigat!!!!!", MsgBoxStyle.OkCancel) Label7.Text += 1 ElseIf Button1.Text = "X" And Button2.Text = "0" And Button3.Text = "X" Then MsgBox("Remiza") End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If tic = 1 Then Button1.Text = "0" Label2.Text = "X" Else Button1.Text = "X" Label2.Text = "0" End If tic += 1 If tic > 2 Then tic = 1 End If Call win() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If tic = 1 Then Button2.Text = "0" Label2.Text = "X" Else Button2.Text = "X" Label2.Text = "0" End If tic += 1 If tic > 2 Then tic = 1 End If Call win() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If tic = 1 Then Button3.Text = "0" Label2.Text = "X" Else Button3.Text = "X" Label2.Text = "0" End If tic += 1 If tic > 2 Then tic = 1 End If Call win() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click If tic = 1 Then Button4.Text = "0" Label2.Text = "X" Else Button4.Text = "X" Label2.Text = "0" End If tic += 1 If tic > 2 Then tic = 1 End If Call win() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click If tic = 1 Then Button5.Text = "0" Label2.Text = "X" Else Button5.Text = "X" Label2.Text = "0" End If tic += 1 If tic > 2 Then tic = 1 End If Call win() End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click If tic = 1 Then Button6.Text = "0" Label2.Text = "X" Else Button6.Text = "X" Label2.Text = "0" End If tic += 1 If tic > 2 Then tic = 1 End If Call win() End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If tic = 1 Then Button7.Text = "0" Label2.Text = "X" Else Button7.Text = "X" Label2.Text = "0" End If tic += 1 If tic > 2 Then tic = 1 End If Call win() End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click If tic = 1 Then Button8.Text = "0" Label2.Text = "X" Else Button8.Text = "X" Label2.Text = "0" End If tic += 1 If tic > 2 Then tic = 1 End If Call win() End Sub Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click If tic = 1 Then Button9.Text = "0" Label2.Text = "X" Else Button9.Text = "X" Label2.Text = "0" End If tic += 1 If tic > 2 Then tic = 1 End If Call win() End Sub Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click Button1.Text = "" Button2.Text = "" Button3.Text = "" Button4.Text = "" Button5.Text = "" Button6.Text = "" Button7.Text = "" Button8.Text = "" Button9.Text = "" End Sub Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click MsgBox("Joc creat de Raven") Form2.Show() End Sub Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click Label6.Text = "0" Label7.Text = "0" End Sub End Class Autor : Eu Download Source code: http://rapidshare.com/files/182075755/X_and_Zer0.rar.html