Results 1 to 2 of 2

Thread: Restarting system

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    Atlanta, GA
    Posts
    75
    What is the API function (or built-in VB function) that restarts Windows? Thanks.

    Jay

  2. #2
    Hyperactive Member
    Join Date
    Jun 1999
    Posts
    308
    Hi, Jay.

    Put this in the Module declaration:
    Code:
    Public Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
    Public Const EWX_FORCE = 4
    Public Const EWX_LOGOFF = 0
    Public Const EWX_REBOOT = 2
    Public Const EWX_SHUTDOWN = 1
    
    'Form code
    t& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0)
    Larisa



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