Skip to content

How to Automatic shutdown the PC

Christian Cuan

Asked Feb 2, 2006, 2:46 PM EST1 answer
Share
LinkedInX
Please help me or give me some ideas how to automatic shotdown the PC using C# in windows appliaction. the scenario is i have an shutdown button if it it will be press the PC will automatic close all your your application and shotdown your computer... Thanks

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hey,

    Application.SetSuspendState(PowerState.Suspend, false, false);

    is roughly the command you want. Waking it up again is a bit more complicated though, but it's doable. Chris
    0