Private Sub Command1_Click(Index As Integer) If Index > 0 Then MsgBox "请不要用克隆品克隆" Exit Sub Else If Index = 0 Then If Command1(Command1.Count - 1).Left + 2 * Command1(0).Width <= Me.Width Then Load Command1(Command1.Count) Command1(Command1.Count - 1).Visible = True Command1(Command1.Count - 1).Left = Command1(Command1.Count - 2).Left + Command1(Command1.Count - 2).Width Command1(Command1.Count - 1).Caption = "我是克隆品" Else MsgBox "禁止继续克隆!" Exit Sub End If End If End If End Sub
If Index > 0 Then
MsgBox "请不要用克隆品克隆"
Exit Sub
Else
If Index = 0 Then
If Command1(Command1.Count - 1).Left + 2 * Command1(0).Width <= Me.Width Then
Load Command1(Command1.Count)
Command1(Command1.Count - 1).Visible = True
Command1(Command1.Count - 1).Left = Command1(Command1.Count - 2).Left + Command1(Command1.Count - 2).Width
Command1(Command1.Count - 1).Caption = "我是克隆品"
Else
MsgBox "禁止继续克隆!"
Exit Sub
End If
End If
End If
End Sub