Results 1 to 2 of 2

Thread: restart windows code

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    4

    Question

    Can someone tell me the code that will restart windows when I click the button I made in VB.Thank you

  2. #2
    Guest
    Try this:
    Code:
    Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
    Const EWX_REBOOT = &H2
    
    Private Sub Command1_Click()
        ExitWindowsEx EWX_REBOOT, 0
    End Sub

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