Windows ShutdownWindows Shutdown Component for VCL
For all versions of Delphi and C++ Builder from 3 to 10.2 Tokyo and for all versions of Windows from XP to 10
Windows Shutdown (TWindowsShutdown component) allows to shutdown your Windows in any mode with the following methods: Sleep, Hibernate, LogOff, PowerOff, Reboot, ShutDown. The Force mode allows you to shutdown the Windows XP immediately independing from unsaved information in the currently run applications. The TurnOffDialog method allows to call the standard "Sleep / Turn off / Reboot" dialog.
Windows Shutdown suite includes demo project that demonstrates main features of TWindowsShutdown component: