请问如何打开关机的对话框?
按关机按钮就会弹出关机的对话框,请问如何用VB来实现啊?
模块:
Declare Function SHShutDownDialog Lib "shell32" Alias "#60" (ByVal lType As Long) As Long
Public Const EWX_LOGOFF = 0
Public Const EWX_SHUTDOWN = 1
Public Const EWX_REBOOT = 2
Public Const EWX_FORCE = 4
Public Const EWX_POWEROFF = 8
引用:
Private Sub Command1_Click()
SHShutDownDialog EWX_SHUTDOWN
End Sub