VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "倒计时"
   ClientHeight    =   1590
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   2880
   LinkTopic       =   "Form1"
   ScaleHeight     =   1590
   ScaleWidth      =   2880
   StartUpPosition =   3  '窗口缺省
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   2400
      Top             =   1200
   End
   Begin VB.CommandButton Command2 
      Caption         =   "开始"
      Height          =   375
      Left            =   1560
      TabIndex        =   2
      Top             =   840
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "设置"
      Height          =   375
      Left            =   360
      TabIndex        =   1
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "55"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   2175
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim t As Integer, mm As Integer, ss As Integer
Private Sub Command1_Click()
    t = InputBox("请以秒为单位输入倒计时时间")
    mm = t / 60
    ss = t Mod 60
    Label1.Caption = CStr(mm) + ":" + CStr(ss)
End Sub

Private Sub Command2_Click()
    Timer1.Enabled = True
End Sub

Private Sub Form_Load()
    Timer1.Enabled = False
End Sub

Private Sub Timer1_Timer()
    t = t - 1
    mm = t / 60
    ss = t Mod 60
    Label1.Caption = CStr(mm) + ":" + CStr(ss)
    If t = 0 Then
        Timer1.Enabled = False
        Label1.Caption = "时间到!"
    End If
End Sub
