实现效果:
知识运用:
Application类的SetSuspendState方法 //挂起系统或使系统休眠
public static bool SetSuspendState (PowerState state ,bool force , bool disableWakeEvent)
实现代码:
private void button1_Click(object sender, EventArgs e) { Application.SetSuspendState(PowerState.Hibernate,true,false); }