你姐那杆枪 发表于 2009-3-19 15:48:37

借用1下论坛

PrivateDeclareFunctionExitWindowsExLib"user32"(ByValuFlagsAsLong,ByValdwReservedAsLong)AsLong
ConstEWX_SHUTDOWN=1
ConstEWX_LOGOFF=0
ConstEWX_REBOOT=2
ConstEWX_FORCE=4
PrivateSubCommand1_Click()
Dima
a=ExitWindowsEx(EWX_LOGOFForEWX_FORCEorEWX_SHUTDOWN,0)
EndSub
如果将
a=ExitWindowsEx(EWX_LOGOFForEWX_FORCEorEWX_SHUTDOWN,0)
改换为
a=ExitWindowsEx(EWX_LOGOFForEWX_REBOOT,0)

你姐那杆枪 发表于 2009-3-19 15:49:51

PrivateDeclareFunctionExitWindowsExLib"user32"(ByValuFlagsAsLong,ByValdwReservedAsLong)AsLong
ConstEWX_SHUTDOWN=1
ConstEWX_LOGOFF=0
ConstEWX_REBOOT=2
ConstEWX_FORCE=4

PrivateSubCommand1_Click()
Dima
a=ExitWindowsEx(EWX_LOGOFForEWX_FORCEorEWX_SHUTDOWN,0)
EndSub

如果将
a=ExitWindowsEx(EWX_LOGOFForEWX_FORCEorEWX_SHUTDOWN,0)
改换为
a=ExitWindowsEx(EWX_LOGOFForEWX_REBOOT,0)

&`孫鯃倥*,≈ 发表于 2009-3-19 16:47:25

VB自动关机程序


{:5_763:}
页: [1]
查看完整版本: 借用1下论坛