How to Automatic shutdown the PC
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.
Chris14 pointsPosted Feb 3, 2006, 4:10 PM EST
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