Results 1 to 3 of 3

Thread: Detect when switching to battery power in laptop...

  1. #1

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    Detect when switching to battery power in laptop...

    hi guys...

    just a quick help required if possible...

    i know i can use:
    API: GetSystemPowerStatus
    to get the current power status etc...

    but how can i detect [live] when the power switches to AC [power cord in] and Battery power?...

    - if switching to battery i need to turn off laptop monitor etc, and then enable it when back on power... - cant work out how, except a timer to keep checking, which will run the battery power faster... hooking the window could do this? ive search the forum and cant work it out...

    cheers guys.
    Wayne

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Detect when switching to battery power in laptop...

    VB6 ships with a control for this sort of thing. See Visual Basic: SysInfo Control.

  3. #3

    Thread Starter
    Frenzied Member wpearsall's Avatar
    Join Date
    Feb 2002
    Location
    England / UK
    Posts
    1,065

    Re: Detect when switching to battery power in laptop...

    oh yeah sorry, forgot to mention i know about that control. i was hoping it was possible to do [without] the use of a control... - i wanna keep my install package as small as possible...

    - and since u can do most the stuff of that control without using it i was wondering about this function...
    Wayne

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