Kaikki on varmaan jo jonkin aikaa toivonut ristinollaa tänne. Mutta nyt kaikki saa sen ristinollan minkä on toivonut se ei käytä mitään huippu erikoista koodia vaan ihan tavallista kaikki osaa tehdä ristinollan jos osaa edes jonkin verran visualbasicin koodia. Jos haluat kopioda tämän suoraan sinulla pitää olla picturebox:01, 02, 03, 04, 05, 06, 07, 08, 09 sitten image:1, 2, 3, 4, 5, 6, 7, 8, 9
frame:1, 2 label:1, 2 commandbutton: 1 ja timer:3
Dim sp1 As Boolean
Dim sp2 As Boolean
Dim p1p As Integer
Dim p2p As Integer
Function lösch()
O1.Visible = False
O2.Visible = False
O3.Visible = False
O4.Visible = False
O5.Visible = False
O6.Visible = False
O7.Visible = False
O8.Visible = False
O9.Visible = False
X1.Visible = False
X2.Visible = False
X3.Visible = False
X4.Visible = False
X5.Visible = False
X6.Visible = False
X7.Visible = False
X8.Visible = False
X9.Visible = False
End Function
Private Sub Command1_Click()
End
End Sub
Private Sub Image1_Click()
If sp1 = True And O1.Visible = False Then
X1.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X1.Visible = False Then
O1.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Form_Load()
sp1 = True
sp2 = False
X1.Visible = False
X2.Visible = False
X3.Visible = False
X4.Visible = False
X5.Visible = False
X6.Visible = False
X7.Visible = False
X8.Visible = False
X9.Visible = False
O1.Visible = False
O2.Visible = False
O3.Visible = False
O4.Visible = False
O5.Visible = False
O6.Visible = False
O7.Visible = False
O8.Visible = False
O9.Visible = False
End SubPrivate Sub Image2_Click()
If sp1 = True And O2.Visible = False Then
X2.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X2.Visible = False Then
O2.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image3_Click()
If sp1 = True And O3.Visible = False Then
X3.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X3.Visible = False Then
O3.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image4_Click()
If sp1 = True And O4.Visible = False Then
X4.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X4.Visible = False Then
O4.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End SubPrivate Sub Image5_Click()
If sp1 = True And O5.Visible = False Then
X5.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X5.Visible = False Then
O5.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image6_Click()
If sp1 = True And O6.Visible = False Then
X6.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X6.Visible = False Then
O6.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image7_Click()
If sp1 = True And O7.Visible = False Then
X7.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X7.Visible = False Then
O7.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image8_Click()
If sp1 = True And O8.Visible = False Then
X8.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X8.Visible = False Then
O8.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub Image9_Click()
If sp1 = True And O9.Visible = False Then
X9.Visible = True
sp2 = True
sp1 = False
Exit Sub
End If
If sp2 = True And X9.Visible = False Then
O9.Visible = True
sp1 = True
sp2 = False
Exit Sub
End If
End Sub
Private Sub O5_Click()
End Sub
Private Sub O6_Click()
End SubPrivate Sub Timer1_Timer()
If sp1 = True Then Form1.MousePointer = 2
If sp2 = True Then Form1.MousePointer = 12
End Sub
Private Sub Timer2_Timer()
If X1.Visible = True And X2.Visible = True And X3.Visible = True Then
MsgBox "Pelaaja X voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p1p = p1p + 1
Timer2.Enabled = True
End If
If X1.Visible = True And X4.Visible = True And X7.Visible = True Then
MsgBox "Pelaaja X voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p1p = p1p + 1
Timer2.Enabled = True
End If
If X1.Visible = True And X5.Visible = True And X9.Visible = True Then
MsgBox "Pelaaja X voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p1p = p1p + 1
Timer2.Enabled = True
End If
If X2.Visible = True And X5.Visible = True And X8.Visible = True Then
MsgBox "Pelaaja X voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p1p = p1p + 1
Timer2.Enabled = True
End If
If X3.Visible = True And X6.Visible = True And X9.Visible = True Then
MsgBox "Pelaaja X voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p1p = p1p + 1
Timer2.Enabled = True
End If
If X3.Visible = True And X5.Visible = True And X7.Visible = True Then
MsgBox "Pelaaja X voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p1p = p1p + 1
Timer2.Enabled = True
End If
If X4.Visible = True And X5.Visible = True And X6.Visible = True Then
MsgBox "Pelaaja X voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p1p = p1p + 1
Timer2.Enabled = True
End If
If X7.Visible = True And X8.Visible = True And X9.Visible = True Then
MsgBox "Pelaaja X voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p1p = p1p + 1
Timer2.Enabled = True
End If
If O1.Visible = True And O2.Visible = True And O3.Visible = True Then
MsgBox "Pelaaja O voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p2p = p2p + 1
Timer2.Enabled = True
End If
If O1.Visible = True And O4.Visible = True And O7.Visible = True Then
MsgBox "Pelaaja O voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p2p = p2p + 1
Timer2.Enabled = True
End If
If O1.Visible = True And O5.Visible = True And O9.Visible = True Then
MsgBox "Pelaaja O voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p2p = p2p + 1
Timer2.Enabled = True
End If
If O2.Visible = True And O5.Visible = True And O8.Visible = True Then
MsgBox "Pelaaja O voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p2p = p2p + 1
Timer2.Enabled = True
End If
If O3.Visible = True And O6.Visible = True And O9.Visible = True Then
MsgBox "Pelaaja O voittaa", vbOKOnly, "The End"
Timer2.Enabled = False
lösch
p2p = p2p + 1
Timer2.Enabled = True
End If
If O3.Visible = True And O5.Visible = True And O7.Visible = True Then
MsgBox "Pelaaja O voittaa", vbOKOnly, "The End"
Timer2.Enabled = False
lösch
p2p = p2p + 1
Timer2.Enabled = True
End If
If O4.Visible = True And O5.Visible = True And O6.Visible = True Then
MsgBox "Pelaaja O voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p2p = p2p + 1
Timer2.Enabled = True
End If
If O7.Visible = True And O8.Visible = True And O9.Visible = True Then
MsgBox "Pelaaja O voittaa", vbOKOnly, "Loppu"
Timer2.Enabled = False
lösch
p2p = p2p + 1
Timer2.Enabled = True
End If
End Sub
Private Sub Timer3_Timer()
Label3.Caption = p1p
Label4.Caption = p2p
End SubJokainen saa antaa sitten mielipiteensä jos kiinnostaa kiitos.
Hieno, mutta propleema on vaan -- ei toimi.
Control arrayt on kova sana.
lainaus:
Control arrayt on kova sana.
Näköjään ;D
Aihe on jo aika vanha, joten et voi enää vastata siihen.