展开全部
好的代码来了,直接复制到VB,运行下看结果就好了!!!
Private Declare Function exitwindows Lib "User" (ByVal dwReturnCode As Long, ByVal wReserved As Integer) As Integer
Dim myval As Integer
Private Sub Command1_Click()
'重新启动计算机
myval = exitwindows(&H43, 0)
End Sub
Private Sub Command2_Click()
'关闭计算机
myval = exitwindows(&H42, 0)
End Sub
我也是VB爱好者,以后相互切磋呗! ^_^
Private Declare Function exitwindows Lib "User" (ByVal dwReturnCode As Long, ByVal wReserved As Integer) As Integer
Dim myval As Integer
Private Sub Command1_Click()
'重新启动计算机
myval = exitwindows(&H43, 0)
End Sub
Private Sub Command2_Click()
'关闭计算机
myval = exitwindows(&H42, 0)
End Sub
我也是VB爱好者,以后相互切磋呗! ^_^
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询