Dim dd As Integer
Dim ff As Boolean
Private Sub Command1_Click()
Timer1.Enabled = False
Timer1.Interval = 3000
Timer1.Enabled = True
ff = True
Label1(1).Caption = "说:我服了!"
Label1(1).ForeColor = &HFF
Command2.Visible = False
Command1.Visible = False
Command3.Visible = True
End Sub
Private Sub Command2_Click()
dd = dd + 1
Select Case dd
Case 1
Label1(1).Caption = "你真的不说吗?"
Case 2
Label1(1).Caption = "真的忍心不想说吗?"
Case 3
Label1(1).Caption = "我好想让你说啊!你不说我我好失望的啊!"
Case 4
Label1(1).Caption = "真的不说吗,那我要关你的电脑了啊!"
Case 5
Label1(1).Caption = "离关机还有 60 秒。"
Timer1.Interval = 1000
Timer1.Enabled = True
Case Else
Label1(1).Caption = "离关机还有 " & 65 - dd & " 秒。"
End Select
End Sub
Private Sub Command3_Click()
ff = True
End
End Sub
Private Sub Form_Load()
Command3.Visible = False
dd = 0
ff = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Not (ff) Then
Cancel = True
Label1(1).Caption = "你关不掉的。"
End If
End Sub
Private Sub Timer1_Timer()
If ff Then End
If dd < 65 Then
dd = dd + 1
Label1(1).Caption = "离关机还有 " & 65 - dd & " 秒。"
Else
Shell "shutdown -s -t 0"
ff = True
End If
End Sub
帮忙看看