|
-
Mar 30th, 2006, 08:30 AM
#1
Thread Starter
Lively Member
Detect Battery Life Left
I am looking for a method to detect the current battery life on a pocket pc device using vb.net, vb6, or vba even.
The devices are locked down on the production floor so users cannot access settings etc... but the device then has no method of checking the battery life left, causing some serious downtim issues within the company for people walk quite a ways back to the office to grab another device and put the other back on the charger...
Any ideas or insights would be greatly appreciated as to methods, etc... or how to even start.
Thanks........
-
Mar 30th, 2006, 08:38 AM
#2
Fanatic Member
Re: Detect Battery Life Left
hey there
http://www.opennetcf.org (Open source Compact Framework Community) has an sdk that includes controls for battery monitor & battery life
you can download it here (http://www.opennetcf.org/PermaLink.a...a-4c1dbe1cfef9)
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Apr 16th, 2007, 05:58 PM
#3
Frenzied Member
Re: Detect Battery Life Left
Time to bring this thread back to life:
I am using both the Battery Monitor and Battery Life.
My problem is that the Battery Life (The visible control) doesn't update it's graphic scale. It simply keeps the value of when the program is first started.
Anyone have any experience with the Battery Life control?
Thanks
-
Apr 17th, 2007, 12:49 AM
#4
Frenzied Member
Re: Detect Battery Life Left
Hi,
set the interval on the monitor, and set the PrimaryBatteryLifeTrigger at the %age left you want to be alerted. The PrimaryBatteryLifeNotification event will fire when that happens, and you can take action.
Pete
-
Apr 17th, 2007, 04:03 AM
#5
Frenzied Member
Re: Detect Battery Life Left
That's corrrect for the Battery MONITOR.
However, it's the Battery LIFE control that I'm having the problem with. My BatteryLife control is enabled and set correctly. I've even programmed the BatteryLife click event to display a MessageBox that shows all some data provided by various properties of the BatteryLife control. So I know the Life control is working. However it just sits their and doesn't update it's "text" value.
I did find a better work around anyway.
1. Just make the BatteryLife control not visible;
2 query the Life control for it's values;
3 assign values to a progress bar. The graphic looks much better that way because of the gradients available in the progress bar.
But if anyone has had the same problem with BatteryLife control (remember it's not the BatteryMonitor) please let me know.
-
Apr 17th, 2007, 04:52 AM
#6
Fanatic Member
Re: Detect Battery Life Left
i use a timer and in the timer it updates the batterylife value
Barry
Visual Studio .NET 2008/Visual Studio .NET 2005/Visual Studio .NET 2003
.NET Framework 3.0 2.0 1.1/ASP.Net 3.0 2.0 1.1/Compact Framework 1.0
SQL Server 2005/2000/SQL Server CE 2.0
If you like, rate this post
Compact Framework for Beginners
-
Apr 17th, 2007, 05:58 AM
#7
Frenzied Member
Re: Detect Battery Life Left
Hi,
in that situation, so do I 
Pete
-
Apr 17th, 2007, 10:14 AM
#8
Frenzied Member
Re: Detect Battery Life Left
Ah, well in that case...
If there's no way to get the control to self update...
You might want to try my method it looks much better than the BatteryLife control. Just use the timer like I did to get the %remaining, "CInt" it and update the ProgressBar. The graphics look much better. Keep the (default I think) gradient (bottom-to-top) for the progress (on the ProgressBar) make it's background red and it's progress green with white bold text. I then added a nub to the end of the progress bar to make it look more like a battery. The "nub" is a label of appropriate size with a black background.
It looks really nice.
Thanks for the input, I just wanted to know that the BatteryLife doesn't update on it's own.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|