will not work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nimbalkar
    New Member
    • Feb 2008
    • 14

    will not work

    const EWX_LogOff as long=0
    const EWX_SHUTDOWN as long=1
    const EWX_REBOOT as long=2
    const EWX_FORCE as long=4
    Private Declare Function ExitWindow _
    Lib "User32" Alias "ExitWindow Ex" _
    (Byval dwOption as Long, Byval dwReserved as Long) as Long
    Private Sub command1_Click( )
    ExitWindow EWX_SHUTDOWN,&H FFFFFFFF
    End Sub
    Private Sub command2_Click( )
    ExitWindow EWX_REBOOT ,&HFFFFFFFF
    End Sub

    problem:
    there is no error but the window willnot shutdown
    wht can i do
  • Bum
    New Member
    • Jan 2008
    • 19

    #2
    Not sure what you're trying to do here

    if you're trying to close an application use killprocess

    hope this helps,

    b

    Comment

    • jamesd0142
      Contributor
      • Sep 2007
      • 471

      #3
      Originally posted by Bum
      Not sure what you're trying to do here

      if you're trying to close an application use killprocess

      hope this helps,

      b

      I believe he is tryin to shutdown windows...

      What version of vb are you using?

      there's a good article here:

      Comment

      Working...