drupal stats

Hibernate the Computer using C#

September 15th, 2011 C# 0 Comments


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);            

        }

  

    }

}

Tags: C# hibernate, hibernate c#, c# hibernate tutorial, hibernate tutorial net c#, hibernate c# tutorial, hibernate tutorial in c#, hibernate in c#, hibernate tutorial for c sharp, hibernate system using c#, hibernate with c# tutorial

Related posts:

  1. Changing Button Background Image on Mouse Hover
  2. Get Excel Sheet Names using C#
  3. Shutdown the Computer using C#
  4. Restart the Computer using C#
  5. Logoff the Computer using C#

No Comments