Results 1 to 3 of 3

Thread: how to shutdown system in my app

  1. #1

    Thread Starter
    Junior Member iqueen's Avatar
    Join Date
    Sep 2003
    Posts
    29

    how to shutdown system in my app

    how to call function to shotdown my system in my app. Can show me some sample code . thanks.

  2. #2

    Thread Starter
    Junior Member iqueen's Avatar
    Join Date
    Sep 2003
    Posts
    29
    I found the follow code in MSDN->Shell, but how to enable it in VB.Net ?
    Thanks.
    VB Code:
    1. Visual Basic:
    2.  
    3. Private Sub fnShellShutdownWindowsVB()
    4.     Dim objShell As Shell
    5.    
    6.     Set objShell = New Shell
    7.     objShell.ShutdownWindows
    8.  
    9.     Set objShell = Nothing
    10. End Sub
    11. Method Information
    12.  
    13. Minimum DLL version shell32.dll version 4.71 or later
    14. Minimum operating systems Windows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    The problem is some old ways won't work on new OS (2000 or XP) , Try this . It should work .http://www.vbforums.com/showthread.p...ghlight=logoff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width