Results 1 to 2 of 2

Thread: How can I bring up the Windows NT logon screen?

  1. #1

    Thread Starter
    Addicted Member Daniel_Christie's Avatar
    Join Date
    Jan 2000
    Location
    USA
    Posts
    245
    I need to bring up a Windows logon screen with only one keypress. What is the API call to bring up the Window's Logon Screen?

    I appreciate any help you may have to offer,
    Daniel Christie

  2. #2
    Addicted Member bbosh's Avatar
    Join Date
    Oct 2000
    Location
    Hell (AKA New Mexico)
    Posts
    186
    Code:
    ' API Function
    Private Declare Function ExitWindowsEx Lib "user32.dll" _ 
    (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
    
    ' Logoff
    Sub Shutdown
    Dim Retval as Long
       Retval = ExitWindowsEx(0, 0) ' First 0 is logoff code
       ' second 0 is reserved in case future Win versions need it
       '(0, 0) is logoff
       '(1, 0) is shutdown
       '(1 Or 5, 0) is forced shutdown (can be quicker)
       '(2, 0) is Restart
       If Retval = 0 then ' error occured
          .
          .
          .
       End If
    End Sub
    [Edited by bbosh on 10-21-2000 at 01:28 AM]
    Brian
    Programming: VB5 Pro (SP3) - QBasic 1.1,4.5
    Internet: HTML 4, CSS, JavaScript
    Visit AltInt.com!

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