第2个回答 2006-07-12
'本页中看到的反杠是生成此网页时系统加上的,源代码中无此反杠
\'Timer1的Interval设置为1000
Dim h, m, s
Private Sub Form_Load()
h = Hour(Now)
m = Minute(Now)
s = Second(Now)
End Sub
Private Sub Timer1_Timer()
If (Hour(Time) - h) <= 9 Then
hh = \"0\" & (Hour(Time) - h)
End If
If (Minute(Time) - h) <= 9 Then
mm = \"0\" & (Minute(Time) - h)
End If
If (Second(Time) - h) <= 9 Then
ss = \"0\" & (Second(Time) - h)
End If
StatusBar1.SimpleText = hh & \":\" & mm & \":\" & ss
End Sub本回答被提问者采纳