Wrox Programmer Forums
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 7th, 2006, 01:15 PM
Registered User
 
Join Date: Jul 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default shut down

hello group

      i want to know how to shut down computer using
  c#

i have seen many source code on net to shut down the

  computer but they are readymade programe.


actually i want to make this programe from scratch


but i am helpless to get full information required to

make this programe.


 plz help....


 
Old July 8th, 2006, 02:23 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try this
 System.Diagnostics.Process.Start("Shutdown", "/s")

Bijgupt
 
Old July 9th, 2006, 07:09 PM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Take a look at these tutorials:
Shutdown windows after specified time: http://www.codeproject.com/useritems/shutdownwin.asp
Timer Computer Shutdown: http://web6.codeproject.com/csharp/t...ershutdown.asp

You'll see bijgupt's solution in one of the articles:
            //Shutdown windows
            'MsgBox("Shutdown commencing")
            System.Diagnostics.Process.Start("Shutdown", "/s")

- Adam Kahtava [http://adam.kahtava.com]
 
Old July 10th, 2006, 11:48 PM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by bijgupt
 try this
System.Diagnostics.Process.Start("Shutdown", "/s")

Bijgupt
lovingly,shoaib





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to shut down Computer using ASP 3.0 shahhussain Classic ASP Basics 4 August 24th, 2006 03:01 PM
Shut down Access database ppenn Access VBA 3 September 1st, 2005 09:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.