'Open New Project which contains one
form, 4 buttons and one module.Name button 1 as Logoff,
button 2 as Reboot, button 3 'as ShutDown and the last one as Quit. Declare api public function in module together with all constants needed.in module Public Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long Public Const EWX_FORCE = 4 Public Const EWX_SHUTDOWN = 1 Public Const EWX_REBOOT = 2 Public Const EWX_LOGOFF = 0 'And place this code in
the form Private Sub Command2_Click() Private Sub Command3_Click() Private Sub Command4_Click() |