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 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 Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.