Wend
'设置按钮大小及位置属性
a = 0
While a < 2
Command1(a).Left = 4700
Command1(a).Top = a * 1500 + 2000
Command1(a).Width = 1050
Command1(a).Height = 500
Command1(a).Caption = Mid("开始游戏结束游戏", a * 4 + 1, 4)
a = a + 1
Wend
'设置标签位置等属性
Label1.Left = 4700
Label1.Top = 2900
Label1.Caption = "战况:未开始"
End Sub
3 添加全局变量
Public start As Integer
Public starttime As Long
4 命令按钮
Private Sub Command1_Click(Index As Integer)
Dim a, b, c As Integer
Dim pic(9) As Integer
pic(6) = 7
If Index = 0 Then
'随机排列图片框
Randomize
For a = 0 To 1000
Call empty_do(Picture1(Rnd(1) * 9), Picture1(9))
Next
start = 1 Command1(0).Caption = "重新开始"
|