PC Review


Reply
Thread Tools Rate Thread

Battery Status in Percent

 
 
verenadoll@gmail.com
Guest
Posts: n/a
 
      18th Mar 2009
Hello NG,

how can i get the battery status in percent? I am using Windows Mobile
6.

Regards, Verena
 
Reply With Quote
 
 
 
 
Carsten Unterberg
Guest
Posts: n/a
 
      18th Mar 2009
Hi Verena,

<(E-Mail Removed)> schrieb im Newsbeitrag
news:cd70b932-7fc4-4731-9ae3-(E-Mail Removed)...
> Hello NG,
>
> how can i get the battery status in percent? I am using Windows Mobile
> 6.



with Microsoft.WindosMobile.Status /
System.state.PowerBatteryStrengthProperty you don't get the exact value, you
get just a range. Maybe the GetSystemPowerStatusEx from coredll.dll helps
you.

[System.State.PowerBatteryStrength Property]
http://msdn.microsoft.com/en-us/libr...ystrength.aspx

[GetSystemPowerStatusEx (coredll)]
http://www.pinvoke.net/default.aspx/...rStatusEx.html


Regards,

Carsten Unterberg | Test-Framework
http://test-framework.blogspot.com/


 
Reply With Quote
 
Lcubed
Guest
Posts: n/a
 
      18th Mar 2009
P/invoke GetSystemPowerStatusEx, you'll also need to create a
SYSTEM_POWER_STATUS_EX structure. If you google "C# pinvoke
GetSystemPowerStatusEx", there are plenty of examples of how to do
this.


On Mar 18, 6:36*am, "Carsten Unterberg"
<carsten.unterb...@googlemail.com> wrote:
> Hi Verena,
>
> <verenad...@gmail.com> schrieb im Newsbeitragnews:cd70b932-7fc4-4731-9ae3-(E-Mail Removed)...
>
> > Hello NG,

>
> > how can i get the battery status in percent? I am using Windows Mobile
> > 6.

>
> with Microsoft.WindosMobile.Status /
> System.state.PowerBatteryStrengthProperty you don't get the exact value, you
> get just a range. Maybe the GetSystemPowerStatusEx from coredll.dll helps
> you.
>
> [System.State.PowerBatteryStrength Property]http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.statu...
>
> [GetSystemPowerStatusEx (coredll)]http://www.pinvoke.net/default.aspx/coredll/GetSystemPowerStatusEx.html
>
> Regards,
>
> Carsten Unterberg | Test-Frameworkhttp://test-framework.blogspot.com/


 
Reply With Quote
 
verenadoll@gmail.com
Guest
Posts: n/a
 
      18th Mar 2009
Thanks, works fine!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Battery status marnix_moed Windows Vista General Discussion 5 25th Feb 2009 08:06 PM
Battery status Richard Microsoft Access 2 29th Nov 2007 01:09 PM
Battery Status Mex Microsoft Dot NET Compact Framework 4 5th Jul 2007 11:07 PM
Battery Status =?Utf-8?B?bHVpc2ZlbGlwZWg=?= Windows XP General 2 24th May 2004 01:28 AM
Battery Status Jim Wilson [eMVP] Microsoft Dot NET Compact Framework 2 22nd Aug 2003 07:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:28 PM.