首先允许我无语一下 - -

代码:

在FORM的LOAD事件加入:

shell "shutdown -s -t 15"

a=inputbox("输入爷爷可以解除关机","输入爷爷")

if a="爷爷" then

shell "shutdown -a"

msgbox "算你识相!"

else

shell "shutdown -a"

shell "shutdown -s -t 0" '马上关机

end if