Option Explicit
Const EWX_LOGOFF = 0
Const EWX_SHUTDOWN = 1
Const EWX_REBOOT = 2
Dim a As Integer
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
Private Sub Command1_Click() '确定开始记时
Select Case a
Case 3
If Left(Text1.Text, 5) - Text2.Text & ":" & Text3.Text = 0 Then
Call ExitWindowsEx(EWX_SHUTDOWN, 0)
End If
Case 2
If Left(Text1.Text, 5) - Text2.Text & ":" & Text3.Text = 0 Then
Call ExitWindowsEx(EWX_REBOOT, 0)
End If
Case 1
If Left(Text1.Text, 5) - Text2.Text & ":" & Text3.Text = 0 Then
Call ExitWindowsEx(EWX_LOGOFF, 0)
End If
End Select
End Sub
Private Sub Command2_Click() '这是结束,就是不要定时了
End
End Sub
Private Sub Form_Load() '显示当时时间
Text1.Text = Time
End Sub
Private Sub Option1_Click(Index As Integer) '用来选择是关机,重起还是注销
a = Index
End Sub
Private Sub Timer1_Timer() '刷新时间
Text1.Text = Time
End Sub
怎么就是不对呀 为什么呀 ???? 作者:
coco1728 时间: 2007-12-5 12:05