HighTechTalks DotNet Forums  

SYSTEM_POWER_STATUS_EX

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss SYSTEM_POWER_STATUS_EX in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Simone
 
Posts: n/a

Default SYSTEM_POWER_STATUS_EX - 03-23-2006 , 05:00 AM






I have a problem on the object to retreive battery status of WM5.0 platform.
I use thid code to retreive information:

ps = new SYSTEM_POWER_STATUS_EX();

bool bRet = GetSystemPowerStatusEx(ref sps);

if (!bRet)

return;

if (sps.BatteryLifePercent == 255 | sps.BackupBatteryLifePercent == 255)

{

BA_label.Text = "Unknown";

}

else

{

Bar_bs1.Value = Convert.ToInt32(sps.BatteryLifePercent);

Bar_bs2.Value = Convert.ToInt32(sps.BackupBatteryLifePercent);

}

In my PPC2003 this code run ok but in WM 5.0 (JasJar or emulator)
sps.BatteryLifePercent return me always 255.

Can anyone help me?



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.