用vb做一个每5分钟提醒一次的软件怎么做

来源:百度知道 编辑:UC知道 时间:2024/05/23 02:21:55
用vb做一个每5分钟提醒一次的软件
最好是声音提醒 或者 分钟的个位数为 0或5 时提醒
下面的误差比较大

画一个timer控件Timer1,Interval属性设为60000(即1分钟)。
编写如下代码:
Private Sub Timer1_Timer()
Static I As Integer
I = I + 1
If I = 5 Then
Beep
I = 0
End If
End Sub

Interval属性设为1000
if i = 300 then
那你这样试试看呢
楼上说 的应该没什么问题啊

'建立一个label1,一个定时器timer1
Dim Tim As String, B As Long, H As Integer, M As Integer, S As Long

Private Sub Form_Load()
Label1.Caption = ""
Tim = Time
Timer1.Interval = 100
End Sub

Private Sub Timer1_Timer()
S = DateDiff("S", Tim, Time)
If S >= 60 Then
B = S
M = B \ 60
S = B Mod 60
If M >= 60 Then
B = M
H = B \ 60
M = B Mod 60
End If
End If
If WindowState = 1 Then
MINTIME
Else
If H = 0 Then
If M = 0 Then