// HibernateApplication.SetSuspendState(PowerState.Hibernate, true, true);// StandbyApplication.SetSuspendState(PowerState.Suspend, true, true);
或者,如果您喜欢系统调用:
[Dllimport("Powrprof.dll", CharSet=CharSet.Auto, ExactSpelling=true)]public static extern bool SetSuspendState(bool hiberate, bool forceCritical, bool disableWakeEvent);// HibernateSetSuspendState(true, true, true);// StandbySetSuspendState(false, true, true);


