2012年4月11日 星期三
2012/04/12
Dim s(2), a(2) As Integer
Dim st(2), totalstr As String
Private Sub Command1_Click(Index As Integer)
If Index = 0 Then
s(Index) = s(Index) + 1
a(Index) = s(Index) Mod 2
Select Case a(Index)
Case 0
Shape1(2).FillColor = QBColor(10)
Label2.Caption = a(Index)
st(Index) = 0
Case 1
Shape1(2).FillColor = QBColor(12)
Label2.Caption = a(Index)
st(Index) = 1
End Select
ElseIf Index = 1 Then
s(Index) = s(Index) + 1
a(Index) = s(Index) Mod 2
Select Case a(Index)
Case 0
Shape1(1).FillColor = QBColor(10)
Label2.Caption = a(Index)
st(Index) = 0
Case 1
Shape1(1).FillColor = QBColor(12)
Label2.Caption = a(Index)
st(Index) = 1
End Select
ElseIf Index = 2 Then
s(Index) = s(Index) + 1
a(Index) = s(Index) Mod 2
Select Case a(Index)
Case 0
Shape1(0).FillColor = QBColor(10)
Label2.Caption = a(Index)
st(Index) = 0
Case 1
Shape1(0).FillColor = QBColor(12)
Label2.Caption = a(Index)
st(Index) = 1
End Select
End If
totalstr = st(0) + st(1) + st(2)
Label1.Caption = totalstr
End Sub
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言