[APP][SVC][Mar 8, 2010] BattLineSvc V2.1 / Battery Indicator Line in Title Bar

Search This thread

thx1200

Inactive Recognized Developer
A really tiny little tool. Will post a screenshot from mine...

One point i have:
It will be very helpfull when there is also a right side offset.
It means with newer skins we have round corners. And with
that the left side offset is wonderfull, but i need also the
right one.

Is this possible for the next version?

that should be pretty easy. I can add that!
 

thx1200

Inactive Recognized Developer
Is it supposed to run on smartphones (aka "WM Standard") as well? I don't get it visible despite the service is started after reboot. Do I have to use a different class name for this?

I don't know enough about the 'standard' platform to know if it will work, but since the classname is configurable, you might be able to get this to work if you know the window class.
 

thx1200

Inactive Recognized Developer
Hi tobbbie,

i don't think that the app is running on smartphones. So far as i understand the soucre code after reading, is this app not compiled for smartphones. I also have seen for the *.exe this resourceppc.h and this Windows Mobile 5.0 Pocket PC SDK (ARMV4I) and this Windows Mobile 6 Professional SDK (ARMV4I) is used. That means it is for powerpc, or i am wrong thx1200?

That's correct, but sometimes apps for professional will work on standard without recompilation, depending on the chipset and the controls used. I just don't have any idea if services.exe is supported on standard, which battlinesvc absolutely requires.
 

SDreamer

Senior Member
Jul 20, 2009
181
1
Gotta say, this is pretty awesome. Now I can see my battery and clock at the same time. All it needs is a UI to configure, and indicator when charging, that would be awesome. Hope you figure that stuff out! Thanks! :D
 

gwinga

New member
Jan 7, 2010
2
0
That would be a really cool idea, but I don't know how to detect 'charging' status. Anybody have a link?

I've played around a bit with Python, but I know nothing about windows mobile programming. I'm too new here to post links, but if you google 'windows mobile battery state enumeration' there's a few links that deal with getting charge status and AC line status.
 

tito12

Senior Member
Feb 15, 2008
1,541
81
Tel Aviv
@ tito,

you have seen the default colors after the installation and before you have changed something??? Next point from 1st posting:

as sample:
color = green
standard hex = #00FF00
BattLineSvc registry value = ff00

You have done this in this way? The leading zeros are not supported. Otherwise the light goes on now?

Hint:
If you need the hex information for a color and you have further problems with your hex calculator, publish an icon 90x90 pixel and you will receive them.

Thanks for your help mike2nl,

I followed these steps and either couldn't see the thin line or some of the hex codes were not valid or accepted by my device. So after tampering with the values I decided to uninstall after stopping the app, then installed again. I noticed the old registry values remained after install, so I removed them manually and repeated the operation.

Also I didn't get your hint...
 

TomasTom

Member
May 1, 2008
9
0
Awesome app. App like this I was looking for a long time ago.
Thank you, thank you.

Just one thing. I have issue with starting after soft reset. I have to do it manually :(
 
Last edited:

kenavner

New member
Sep 16, 2009
1
0
beg to differ

nice job - try to implement "breaks" in the line - like SPB Pocket Plus bar
(so that you actually get a feel of steps)
also looks nicer and feels like it measures something, not like there is something wrong with the pixels at the top of the screen :)

I actually like this because it does NOT have the breaks. IMHO the continuous line looks much cleaner. Thanks for the pgm!
 

NLS

Senior Member
May 27, 2005
2,496
63
Piraeus
www.ilogic.gr
guysif the breaks were just a different color (usually a darker shade of the main color), then defining the breaks to be the same color as the main line, makes them disappear

(if there was such an option I mean hehehe)
 

mike2nl

Senior Member
Jul 24, 2009
3,965
670
64
Near Utrecht
guysif the breaks were just a different color (usually a darker shade of the main color), then defining the breaks to be the same color as the main line, makes them disappear

(if there was such an option I mean hehehe)

Hi NLS,

ok this idea i think is possible. So far as we can use two colors for the bar. No dotted line with one color . This is terrible, really :D.
 

mike2nl

Senior Member
Jul 24, 2009
3,965
670
64
Near Utrecht
Hi thx1200,

it is possible to have from you a todo list foir the next release. I know it is all time the same also for me. But we user wil knooooow so many things :D:D.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Overview
    You've seen these before -- the little green line at the top of the screen that indicates the current battery level. This app is really nothing new or revolutionary. The main difference of BattLineSvc is that it's a true Windows Mobile service, so it does NOT use one of the precious few 32 slots available for processes. You can find more information about services here. This app has been tested on Windows Mobile 5, 6, 6.1, 6.5, and 6.5.3.

    CodePlex
    BattLineSvc development is hosted at Microsoft CodePlex! http://www.codeplex.com/BattLineSvc

    License
    Ms-RL

    Tip Jar
    Like this app? Want more like it or quicker updates? Tip a buck (or Euro or Pound or whatever) or two to help the author out! Click here to make a safe donation via PayPal.

    Current features
    - Shows a nice bar along the top of your screen to indicate battery status.
    - Color changes based on 'warning' and 'critical' battery levels, as well as when the device is on AC power (configurable).
    - Immediately correctly resizes when the screen orientiation changes.
    - The battery level is updated immediately when the device notifies listeners that battery status has changed (or you can specify an interval if your device isn't sending notifications.
    - Can show a bar at the bottom, left, and right sides of the battery bar (if you want it).
    - Can be offset from the left and right, if you need it.
    - Height of the bar can be changed.
    - VERY low resources used -- runs as a TRUE service and uses as close as 0% CPU as is possible by an app like this. So it's good for even older snail devices. :-D
    - Has a configuration app (requires .Net CF 3.5)
    - AppToDate support!

    Recent Changes (See CodePlex or changelog.txt for longer changelog)
    - (2.1) Fixed a bug where on system start-up, it would pop up a notification box to let you know the service started. Annoying! And fixed!
    - (2.1) Fixed the styles in the notification boxes for start/stop service.
    - Fixed bug where sometimes the line would not show up, even with the 90 second boot-up delay. This was due to the window being created too early (not actually delayed, even though the subclassing was properly delayed. Oops!
    - Boot delay was reduced to 30 seconds from system start-up; so far no issues with it starting too early!
    - Added a "right side offset" which works as the left side offset, but for the right side.
    - Added a "right line" which works the same as the left line.
    - Added a new color setting for when the battery is charging. (Default is a light gray-blue.)
    - Battery status, by default, no longer refreshes on an interval, but instead by waiting for battery notification events. This makes BattLineSvc even more efficient! The interval timer is still there in case your device does not work with events only.
    - Reduced the number of subsequent refreshes by requesting a synchronous status refresh; previously it would wait asynchronously which was less efficient since the update could take anywhere from a few milliseconds to several seconds.
    - Removed a redundant battery status checking method which monitored the registry (no longer needed because the new power event-based system works better and is more efficient).
    - Removed a few other old segments of code that were inefficient.
    - Added user notification for starting/stopping the service with the start/stop apps.
    - Added a configuration program (yay). Requires .Net CF 3.5. You can still edit the registry manually.

    Registry
    Look in HKCU\Software\Avian Waves\BattLineSvc
    Colors are best edited as hex, using the following pattern: BBGGRR (seems backwards, but it's due to the endedness of DWORDS in CE). Your registry editor may not show leading zeros either, keep that in mind.
    - TaskbarClass = (string) Don't change this unless you are 100% positive the taskbar is not named standard.
    - Height = (int) Number of pixels tall for the battery line.
    - LeftOffset = (int) Number of pixels from the left edge that the battery line starts.
    - LowPercent = (int 0-100) What percentage of battery charged is considered low (yellow).
    - CriticalPercent = (int 0-100) What percentage of battery charged is considered critical (red).
    - ShowLeftLine = (bool) Show the vertical line on the left side of the title bar where the BattLine starts.
    - ShowRightLine = (bool) Show the vertical line on the left side of the title bar where the BattLine starts.
    - ShowBottomLine = (bool) Show a line on the bottom of the battery bar
    - ColorForegroundSolidNormal = (color) For 'normal' (not low) battery charge, this is the foreground color, default is bright green.
    - ColorBackgroundSolidNormal = (color) For 'normal' (not low) battery charge, this is the background color, default is dark green.
    - ColorForegroundSolidLow = (color) For low battery charge, this is the foreground color, default is bright yellow.
    - ColorBackgroundSolidLow = (color) For low battery charge, this is the background color, default is dark yellow / brown.
    - ColorForegroundSolidCritical = (color) For critical battery charge, this is the foreground color, default is red.
    - ColorBackgroundSolidCritical = (color) For critical battery charge, this is the background color, default is dark red.
    - ColorForegroundSolidCharging = (color) For when the device is charging (on AC), this is the foreground color, default is light gray-blue.
    - ColorBackgroundSolidCharing = (color) For when the device is charging (on AC), this is the background color, default is dark gray-blue.
    - ColorLeftLine = (color) Color of the left line.
    - ColorRightLine = (color) Color of the right line.
    - ColorBottomLine = (color) Color of the bottom line.
    - TimerIntervalSeconds = (int) How often do we look to see if the battery level has changed (in seconds)? NOTE: As of V2, set this value to 0 unless BattLineSvc is not updating on your device. Zero means disabled. This settings is no longer necessary as BattLineSvc now waits for battery notification events, instead of updating on a timer.

    Download
    CAB Installer: http://battlinesvc.codeplex.com/releases
    Source Code: http://battlinesvc.codeplex.com/SourceControl/list/changesets