Results 1 to 4 of 4

Thread: rebooting windows

  1. #1

    Thread Starter
    Lively Member brjames's Avatar
    Join Date
    Jan 2000
    Location
    Tenby, Wales, UK
    Posts
    121

    Post

    I have created a password program for when windows starts up just practising my VB.
    I was wondering how I would go about re-booting the machine if the user types in the wrong password more than say, 3 times?

    Thanks

    brjames

  2. #2
    Guest

    Post

    I know there is an API to bring up the shutdown window....I think there is also one to reboot but I cant find it...must be on my other computer....ill try and get back to you



    Glenn Harwood

  3. #3
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    Check out http://www.vbsquare.com/tips/tip179.html

    Regards,

    ------------------
    - Chris
    [email protected]
    If it ain't broke - don't fix it

  4. #4
    Registered User
    Join Date
    Apr 1999
    Location
    Brazil
    Posts
    144

    Post


    This will reboot your computer:

    Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long


    ExitWindowsEx 2, 1

    'If you wish turn off
    'ExitWindowsEx 1, 0

    Jefferson
    Jefferson

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