Results 1 to 3 of 3

Thread: Pls sat why it doesnt work in W2k

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Brooklyn NY USA
    Posts
    1,258

    Exclamation Pls sat why it doesnt work in W2k

    Code:
    Private Sub Command1_Click()
    answer = MsgBox("Are You Sure You Want To Close Windows", vbYesNo)
    If answer = vbYes Then
    ss = ExitWindowsEx(EWX_SHUTDOWN, 0)
    End If
    End Sub
    Pls explain why it doesnt work in Win 2000 Pro SP1.
    And what code will work

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    You might not have permissions to shut down the computer on the machine.

  3. #3
    Tygur
    Guest
    Windows 2000 and NT have extra security features. Your program has to do some extra stuff before it can shutdown the computer (basically, it has to request permission). Go to this link:
    http://www.planet-source-code.com/xq...s/ShowCode.htm

    It'll explain everything for you.

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