Hey Guys,
there's a simple problem I can not solve, and neither can my friends. How do I shut down the computer in C#. I am trying to make an aplication that would shut down the computer after a countdown closing all other active applications, so that I can go to sleep, and my downloads could still go on for about an hour or two.
If possible I would also like to know how to force my computer to disconnect my dial-up connection in C#.

Recommended Answers

All 3 Replies


Try using ExitWindows or ExitWindowsEx Win32 API calls with P/Invoke.

Loren Soth

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.