Option Explicit
Private Sub Form_Activate()
With Form1
.ScaleWidth = 100
.ScaleHeight = 100
End With
Form1.CurrentX = 50
Form1.CurrentY = 50
Print "请单击窗体"
End Sub
Private Sub Form_Click()
Dim i As Long
For i = 0 To 50 Step 5
Line (50 - i, 50 - i)-(50 + i, 50 + i), , B
Call Sleep(0.05) '暂停0.05秒
Form1.Cls
Next i
End Sub
Private Sub Sleep(Delay As Single) '延时子过程
Dim starttime As Single
starttime = Timer
Do Until Timer - starttime > Delay
Loop
End Sub