PDA

View Full Version : VB problem ...


silviubogan
03-18-2008, 04:30 PM
:)I have VB 6 Pro ... I am a beginner in VB and I want to learn how to make a Tic Tac Toe game with a control array of 9 command buttons .
:confused::confused::confused::confused::confused:
Thanks ! :thumbsup::thumbsup:
Dim sm, si As String
Private Sub Command10_Click()
cd.ShowColor
Form1.BackColor = cd.Color
End Sub

Private Sub Command11_Click()
Form1.BackColor = &HFFFFC0
End Sub

Private Sub Command12_Click()
If Form1.Width > 4500 Then
GoTo a
End If
Do While Form1.Width < 4600
Form1.Width = Form1.Width + 1
Loop
Exit Sub
a:
Do While Form1.Width > 2200
Form1.Width = Form1.Width - 1
Loop
End Sub

Private Sub command13_Click()
If sm = "" Then
MsgBox ("Trebuie mai intai sa iti alegi un semn - X sau O ; pentru a iti alege un semn fa click pe butonul Optioni")
Else

End If
End Sub

Private Sub Form_Load()
List1.AddItem ("X")
List1.AddItem ("O")
End Sub

Private Sub List1_Click()
If List1.ListIndex = 0 Then
sm = "X"
si = "O"
ElseIf List1.ListIndex = 1 Then
sm = "O"
si = "X"
End If
End Sub