我把程序和源码都弄上来,其实都是在网上搜到的!希望对于和我一样的菜鸟有所帮助!
程序代码如下:
Private Sub Command1_Click()
Dim QQNum As String
QQNum = 328191852
Shell "C:\\Program Files\\Internet Explorer\\IEXPLORE.exe tencent://message/?uin=" + QQNum + ""
End Sub
'让窗体能够在开机时启动
Private Sub Form_Load()
Set w = CreateObject("wscript.shell")
w.regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\" & App.EXEName, App.Path & "\" & App.EXEName & ".exe"
Timer1.Interval = 1000
End Sub
Private Sub Label4_Click()
Shell "explorer.exe http://user.qzone.qq.com/328191852"
End Sub
Private Sub Timer1_Timer()
Label1.BackStyle = 0
Label1.Caption = "系统当前日期及时间为:" & Date + Time '显示当前日期及时间
Label1.FontName = "楷体_GB2312"
Label1.FontSize = 18
Label2.BackStyle = 0
Label2.Caption = "作者留言:找编程爱好者一起交流一起学习!"
Label3.Caption = "作者:民中-黑蝎子"
Label3.BackStyle = 0
Label4.Caption = "≯进入黑蝎子地盘≮"
Label4.FontName = "楷体_GB2312"
Label4.FontSize = 13
Label4.BackStyle = 0
If Hour(Time) = 11 And Minute(Time) = 29 And Second(Time) = 50 Then '到了“11:29:50”的时候第二个窗体弹出
Form2.Show
Else
If Hour(Time) = 5 And Minute(Time) = 4 And Second(Time) = 50 Then '到了“5:4:50”的时候第二个窗体弹出
Form2.Show
End If
End If
End Sub
==============================================================================================================
'第二个窗体中的代码:
Private Sub Form_Load()
Timer1.Interval = 1000
Label1.Caption = 10
End Sub
Private Sub Timer1_Timer()
Me.ForeColor = &HFF00&
Me.Cls
Print "系统将在十秒后关闭,请您及时把您重要的文件进行保存,"
Print
Print "以免数据丢失!Quiting……"
Label1.Caption = Label1.Caption - 1 '标签的值减1即10-1,9-1,等等。
If Label1.Caption = 0 Then '当标签里的值等于零时调出提示窗口"时间到了!"
MsgBox "同学你好,放学时间到了,快回去吃饭休息吧,为下午的学习做好准备哟!加油!^_^", vbOKOnly, "还玩?放学啦!"
Else
If Label1.Caption < 0 Then '当标签里的值小于0时就会执行DOS的关机命令
Shell "c:\windows\system32\shutdown.exe /s /t 0"
End If
End If
End Sub
弄了一个晚上才弄好的,哎~鸟跟高手的差别在这节骨眼上最能显现!