shutdown windows

Is there any way of shutting down windows thru a form

is it in the My.Computer listings

please help



Answer this question

shutdown windows

  • Amitkumar Jain

    Thanks. I made a post trying to find this but i was continually told it wasn't a good idea. Thanks.

  • weathers2284

    thanks for da help

    also is there a way of making an app that hides windows all the time kinda like a second OS but with windows still runin in da background


  • PhilDWilson

    You could make a form which is maximized and doesn't have a border etc. To make something similar to this make a form and change the following properties (In the properties window on form designer):

    WindowState - Maximized

    TopMost - True

    ShowInTaskbar - False

    SizeGripStyle - Hide

    FormBorderStyle - None

    This will make the form fullscreen and will not show it in the taskbar.It will not have a close button etc.

    I have been trying to find out whether you can disable ALT+F4 etc. If i find a way i will tell you.



  • Ulla Becker

    briggins5

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing

    e.Cancel = True 'will disable ALT+F4 for your application

    End Sub

    Cath


  • Debabrata.debroy

    it's really simple actually. First call the shell class, and "link" to the ms-dos command called shutdown (go to command prompt and type shutdown to see the different options). The code is as follows:

    Shell("shutdown /s /t 0")

    Where shutdown refers to the command, /s is the option for shutdown (if you wanted to restart, you would replace that with /r) and /t 0 refers to the time it takes to shutdown. If you want it to take 60 seconds to shutdown, replace the 0 with 60.

    I think this will only work on Windows XP, since I dont believe the other windows versions had the shutdown command, but that shouldnt be too big a problem..



  • Attila Molnar

    Hi,

    The below link should be of help.
    Link: http://www.codeproject.com/Purgatory/AMR.asp
    If you think that your post is answered then please mark it as Answer.

    Thank you,
    Bhanu.

     



  • shutdown windows