双击注销button按钮输入code:
Private Sub Button_Click(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ButtonClick
LogoOff()注销计算机
End Sub
双击重新启动按钮button输入code:
Private Sub Button_Click(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ButtonClick
Reboot()
End Sub
双击关闭计算机按钮button输入code:
Private Sub Button_Click(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ButtonClick
startTime = TimeOfDay
If Not IsDate(TextBoxText) Then
用IsData函数判断输入的时间格式
MsgBox(你所输入的不是时间格式! 错误)
Else
entTime = TimeValue(TextBoxText)
End If
TimerEnabled = True
启动定时器
MeWindowState = SystemWindowsFormsFormWindowStateMinimized
最小化窗体
End Sub
如图
双击timer控件如图
[] [] [] []