雙擊注銷button
按鈕輸入code:
Private Sub Button
_Click(ByVal sender As System
Object
ByVal e As System
EventArgs) Handles Button
Click
LogoOff()
注銷計算機
End Sub
雙擊重新啟動按鈕button
輸入code:
Private Sub Button
_Click(ByVal sender As System
Object
ByVal e As System
EventArgs) Handles Button
Click
Reboot()
End Sub
雙擊關閉計算機按鈕button
輸入code:
Private Sub Button
_Click(ByVal sender As System
Object
ByVal e As System
EventArgs) Handles Button
Click
startTime = TimeOfDay
If Not IsDate(TextBox
Text) Then
用IsData函數判斷輸入的時間格式
MsgBox(
你所輸入的不是時間格式
!
錯誤
)
Else
entTime = TimeValue(TextBox
Text)
End If
Timer
Enabled = True
啟動定時器
Me
WindowState = System
Windows
Forms
FormWindowState
Minimized
最小化窗體
End Sub
如圖
雙擊timer
控件如圖
[] [] [] []
From:http://tw.wingwit.com/Article/program/net/201311/15694.html