Welcome

Welcome Anonymous

Thursday, June 24, 2010

How to Turnoff / Restart Computer using C#.NET

Import System.Diagnostics(using System.Diagnostics)in code behind file

Then in shutdown button onclick event write

Process.Start("shutdown", "/s /f");/Force Shutdown
Process.Start("shutdown", "/s /t");/Normal Shutdown
Process.Start("shutdown", "/r ");/Force Restart


Application.Exit();

No comments:

Post a Comment