谁能帮用VB编写一个倒计时的程序啊

来源:百度知道 编辑:UC知道 时间:2024/05/20 00:41:32

Private Const EWX_SHUTDOWN As Long = 1
Private Declare Function ExitWindowsEx Lib "user32" (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long

Dim Hrs
Dim Mnt
Dim AMPM
Dim SetAlarm

Private Sub cmdCurrent_Click()
MsgBox SetAlarm, , "Current Alarm Time"
End Sub

Private Sub cmdQuit_Click()
End
End Sub

Private Sub cmdSet_Click()
Dim h, m, nh, nm
h = Hour(Time)
If h > 12 Then
h = h - 12
optPM.Value = True
Else
optAM.Value = True
End If
m = Minute(Time)
nm = m + 5
If nm > 59 Then
nm = nm - 59
nh = h + 1
If nh > 12 And AMPM = "AM" Then
nh = nh - 12
AMPM = "PM"
ElseIf nh > 12 And AMPM = "PM" Then
nh = nh - 12
AMPM = "A