Assembly: System.Windows.Forms (in system.windows.forms.dll)
public: static bool SetSuspendState ( PowerState state, bool force, bool disableWakeEvent )
public static boolean SetSuspendState ( PowerState state, boolean force, boolean disableWakeEvent )
public static function SetSuspendState ( state : PowerState, force : boolean, disableWakeEvent : boolean ) : boolean
A PowerState indicating the power activity mode to which to transition.
true to force the suspended mode immediately; false to cause Windows to send a suspend request to every application.
true to disable restoring the system's power status to active on a wake event, false to enable restoring the system's power status to active on a wake event.
Return Valuetrue if the system is being suspended, otherwise, false.
If an application does not respond to a suspend request within 20 seconds, Windows determines that it is in a non-responsive state, and that the application can either be put to sleep or terminated. Once an application responds to a suspend request, however, it can take whatever time it needs to clean up resources and shut down active processes.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.