Dim Index As String
Dim a As Integer
Private Sub Command1_Click(Index As Integer)
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Randomize
a = Int(Rnd * 8) + 1
For n = 0 To 7
For a = 1 To 8
Static Index As Integer
Index = (Index + 1) Mod 8
Command1(Index).Caption = a
Next
Next
End Sub
此遊戲是九個command的陣列控制項,
我的問題是
能否把自已想要移動的command和沒數字的command做互換的動作
寫在
Private Sub Command1_Click(Index As Integer)
End Sub
裡然後移動完數字項後
123
456
78
能顯示msgbox"贏"
謝謝指導

全站熱搜

vbqa 發表在 痞客邦 留言(3) 人氣()