MorFa

Educational Blog

MorFa

Educational Blog

مطالب دیگر ما در وبلاگ:
morfa.mihanblog.com

بایگانی
        private void btnLogOff_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("ShutDown", "/l"); //Log Off
        }
        private void btnShutDown_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("ShutDown", "/s"); //Shutdown
        }
        private void btnReboot_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("ShutDown", "/r"); //Restart
        }
        private void btnHibernate_Click(object sender, EventArgs e)
        {
            Application.SetSuspendState(PowerState.Hibernate, true, true); //Hibernate
        }
        private void btnStandBy_Click(object sender, EventArgs e)
        {
            Application.SetSuspendState(PowerState.Suspend, true, true);  //Standby
        }