For hibernate you can just call Application.SetSuspendState.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnHibernate_Click(object sender, EventArgs e)
{
Application.SetSuspendState(PowerState.Hibernate, false, false);
}
}
}
Related posts:
No Comments