Dim Snow(1000, 2), Amounty As Integer
'Public Function a()
' a = #11/23/2004#
'End Function
Public Function b()
b = Now
End Function
Private Sub Form_Load()
a = #5/28/2006#
Label1.Caption = Now
Label2.Caption = DateDiff("d", Now, a) - 1 & "天"
Label3.Caption = 23 - Hour(b) & "小时"
Label4.Caption = 59 - Minute(b) & "分钟"
Label5.Caption = 60 - Second(b) & "秒"
If DateDiff("d", Now, a) < 1 Then
Label2.Caption = 0 & "天"
End If
If b >= #5/28/2006 11:59:59 PM# Then
Label3.Caption = 0 & "小时"
Label4.Caption = 0 & "分钟"
Label5.Caption = 0 & "秒"
Command1.Visible = True
Else
Command1.Visible = False
End If
End Sub
Private Sub Command1_Click()
Dim response
response = MsgBox("消息", vbYesNo + vbQuestion, "提示")
If response = 6 Then
response = MsgBox("消息", vbExclamation, "提示")
ElseIf response = 7 Then
response = MsgBox("消息", vbExclamation, "提示")
End If
'雪花效果
Form1.Show
DoEvents
Randomize
Amounty = 325
For J = 1 To Amounty
Snow(J, 0) = Int(Rnd * Form1.Width)
Snow(J, 1) = Int(Rnd * Form1.Height)
Snow(J, 2) = 10 + (Rnd * 20)
Next J
Do While Not (DoEvents = 0)
For LS = 1 To 10
For I = 1 To Amounty
Snow(I, 1) = Snow(I, 1) + Snow(I, 2)
If Snow(I, 1) > Form1.Height Then
Snow(I, 1) = 0: Snow(I, 2) = 2 + (Rnd * 30)
Snow(I, 0) = Int(Rnd * Form1.Width)
End If
Circle (Snow(I, 0), Snow(I, 1)), 15 * Rnd, RGB(255, 255, 255)
Next I
Form1.Cls
Next LS
Loop
End
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Now
Form_Load
End Sub
需要一个时间控件,再就是几个label
其中时间我做成定死了的,可以变成输入形式
主要是做出来给别人做生日礼物的。呵呵~~~~~~
[此贴子已经被作者于2006-6-9 16:32:43编辑过]