Recommended Posts

i think hiding the app when the battery is plugged in shouldnt be a problem (im no coder)

when the battery is fully charged the icon changes colour so just adding something to that event to uncheck the always on top option would do the trick :)

@bangbang023:

This should get you started: http://www.codeproject.com/cs/media/perpxa...harp.asp?df=100

It is far from complete, so you have to extend that to make something usefull out of it.

Did you use that dll in your app? Someone has shown it to me already and someone even took the trouble of porting it to VB .net, but I am just leery about using someone elses code, even if they do grant full permission to do so.

Did you use that dll in your app? Someone has shown it to me already and someone even took the trouble of porting it to VB .net, but I am just leery about using someone elses code, even if they do grant full permission to do so.

There is no DLL, only a C# class file.

I used this class indeed, as a base though. I added extra code to handle mouse clicks, mouse moves, etc.

Okay, now here is the next obvious recommendation. When you change between the 4 battery states, have it fade to whatever the desired state is. So if I have it hidden when I am on battery, then unplug, have it fade to visibility.

Also, I don't know if you are doing this or not, but if you are at 0 opacity, just set this.Show to false. I believe that if you are at 0 opacity but still showing, it still uses cpu power to "draw" the invisible item. I could be wrong there though, if anyone knows for sure let me know.

Other than that it's looking great. You still need to see if you can find out about that click through thing so you can have the meter as just a watermark on the screen and not an actual form thats open. Keep up the great work :)

Edit: Oh yeah, and I bow down before you after that last comment Schmoove ;)

Okay, now here is the next obvious recommendation. When you change between the 4 battery states, have it fade to whatever the desired state is. So if I have it hidden when I am on battery, then unplug, have it fade to visibility.

Also, I don't know if you are doing this or not, but if you are at 0 opacity, just set this.Show to false. I believe that if you are at 0 opacity but still showing, it still uses cpu power to "draw" the invisible item. I could be wrong there though, if anyone knows for sure let me know.

Other than that it's looking great. You still need to see if you can find out about that click through thing so you can have the meter as just a watermark on the screen and not an actual form thats open. Keep up the great work :)

Edit: Oh yeah, and I bow down before you after that last comment Schmoove ;)

Yeah I thought about the fade thing, but forgot to implement it :blush:

I'll schedule that for the next release. In the next release also the trayicon will mimic the battery state.

About the CPU usage, I don't think that is really nescessary. Currently the application hardly uses CPU power. In the taskmanager I don't see it use any even.... it stays on 0% all the time.

I've been searching for info on how to make the monitor click-through, but haven't been able to find anything on that matter. I know you probably have to check which window is behind it and then pass the click message to that application, though I haven't been able to pull that off yet. Maybe in a later release, but can't promise.

I can, but I'm not gonna....

Let me clarify that statement a bit.

Normally I only program in C++, I did quite a lot of stuff in C++ so it would not be too hard to make this application in C++. Though I want to learn how to use C# and in particular the .NET framework, therefore I chose to make this project in .NET. So just to learn.

I can easily make this in C++, it is no that difficult, but I'm not gonna, because it will cost me a lot of time to rewrite the whole code. Besides I will end up with 2 versions I have to maintain, one because I still want to continue exploring .NET and one because you want one in C++, which is not something I'm looking forward to. So I'm simply not gonna make it in C++, period.

.NET might use a bit more memory, but if you have 512mb (or even 256mb) it shouldn't be much of a problem. It uses RAM, but that doesn't mean it performs bad. Infact, it hardly uses CPU cycles, so I don't see the problem. It doesn't hog your system, it doesn't interfere with other programs, so what's the big deal? The bit of extra RAM usage?

Fair enough, if you find it too much, then don't use it.... it's that simple.

Keep in mind though that .NET is the future of Windows. You'll see more and more programs being written in .NET. Better get used to it.

Edited by Schmoove
About the CPU usage, I don't think that is really nescessary. Currently the application hardly uses CPU power. In the taskmanager I don't see it use any even.... it stays on 0% all the time.
True, but a good programmer makes their programs as efficient as possible, even if the difference isn't noticable ;)
Keep in mind though that .NET is the future of Windows. You'll see more and more programs being written in .NET. Better get used to it.

I knew what you meant and why, but the part I quoted is 100% true, and that's what I was happy about. I did C/C++ before I did C# as well, but I wont program in anything other than .NET now. It's much more powerful.

You're right that's true too :laugh:

I'll see if I can come around to do that.

Sorry, I'm just a VERY picky programmer ;) People who have written programs with me know that about me. Any little thing that I can make better or faster I do :laugh:

Ok, let's see if someone can help me.

When i'm not using the battery in my laptop and i dont have plug the icon stay's like that and i dont have a transparency control over it.

I'm using version 0.4, in version 0.3 the transparency control used to control these state too.

The only options now are to disable the prog, and i dont want to do it.

Any sugestions?

PS: sorry about the bad english.

Print

batmon.JPG

Ok, let's see if someone can help me.

When i'm not using the battery in my laptop and i dont have plug the icon stay's like that and i dont have a transparency control over it.

I'm using version 0.4, in version 0.3 the transparency control used to control these state too.

The only options now are to disable the prog, and i dont want to do it.

Any sugestions?

PS: sorry about the bad english.

Print

http://pwp.netcabo.pt/jingarelho/batmon.JPG

I'm sorry, I never really thought about that. I'll release version 0.5 tonight and have that fixed.

Ok, updated to version 0.5.

A small update, but added some usefull features.

version 0.5

- Systemtray icon now mimics the battery monitor, so it shows you the status of you battery

- Added option to fade between monitor transitions

- Fixed the fact that you can't change the opacity when no battery is detected. You can now control the opacity of this state with the "charged" slider

- Systemtray icon now mimics the battery monitor, so it shows you the status of you battery

Could you make it show the recharging icon in the systray, once you are recharging again? This is the icon in my systray tray while recharging, it is at 95% at the moment.. (see attached image) Which to me looks red/battery getting lower.. not that it is, just looks like it/annoying :p

post-88-1095133738.jpg

I just got this program and it's quite cool :)

I have one feature request. Could you add an option for the Monitor to be click-through? This way I can leave it always on top and transparent and be able to click on the windows beneath it. I've done it before so I'll make it easy and give you the code:

protected override CreateParams CreateParams	
{
	get 
	{
  CreateParams cp = base.CreateParams;
  cp.ExStyle |= 0x00000020;  //WS_EX_TRANSPARENT - Makes it click through
  return cp;
	}
}

Good job on a nice program! :yes:

One thing I just noticed to add to your list... Charging should take precidence over critical battery level if you ask me. What I mean by that is when the battery is charging, it should use the opacity for charging, not the opacity for anything else. Unless you changed this in 0.5 which I just installed (and don't feel like draining my battery again just to check), then even when you are charging, if you are below 10% battery, it uses the opacity state of critical. I set critical to 100%, and charging to barely visible, so it doesn't seem right to me that it would be 100% even though it's charging.

That's all from me for now. Oh, and thanks for that snippet of code jay, that will be perfect for this program and I am sure I will use that sometime myself :).

Edit: Just noticed something. Please remove the keyboard accelerators. They affect other work, CTRL-F5 for building/running a program in VS mainly. Thanks

Edited by Betaz
I just got this program and it's quite cool  :)

I have one feature request. Could you add an option for the Monitor to be click-through? This way I can leave it always on top and transparent and be able to click on the windows beneath it. I've done it before so I'll make it easy and give you the code:

protected override CreateParams CreateParams	
{
	get 
	{
  CreateParams cp = base.CreateParams;
  cp.ExStyle |= 0x00000020;  //WS_EX_TRANSPARENT - Makes it click through
  return cp;
	}
}

Good job on a nice program!  :yes:

Thanks man, will see if I can fit that in.

EDIT: well that didn't work. This did though, thanks for the pointer!! (Y)

protected override CreateParams CreateParams	
{
   get 
   {
      CreateParams cp = base.CreateParams;
      cp.ExStyle |= 0x00080020;  //WS_EX_TRANSPARENT + WS_EX_LAYERED
      return cp;
   }
}

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I disagree here sorry. The majority of their customers are corporations who are locked in to their eco system and have no choice. Private individuals don't contribute that much to their income.
    • Weekend PC Game Deals: Anno 117, Final Fantasy VII, Rematch, and more by Pulasthi Ariyasinghe Weekend PC Game Deals is where the hottest gaming deals from all over the internet are gathered into one place every week for your consumption. So kick back, relax, and hold on to your wallets. The Epic Games Store's mystery giveaways may have ended, but its regular freebies didn't miss a step this week. The double drop was for copies of Warhammer 40K Speed Freeks and The Ouroboros King. Speed Freeks lands for multiplayer racing fans, but with plenty of competitive shooting elements too. You will be piloting Ork buggies, tanks, and aircraft modeled after the popular tabletop miniatures while trying to complete objectives and pass finish lines. Next, Ouroboros King is a crossover between chess and tactical roguelikes, offering the chance to create your own army with special rules to beat incoming foes on the board. The double giveaway on the Epic Games Store will be available until June 11, and replacing it will be Citizen Sleeper and ROBOBEAT. The Humble Store brought a new charity bundle to check out this week too. Landing with the name The Complete Inkle Library, this is a large collection of interactive narrative puzzle games from the publisher Inkle. This begins with Heaven's Vault, four parts from the Sorcery series, 80 Days, Overboard, and Pendragon: Narrative Tactics within the starting tier for $9. Hopping up a step to the $12 tier gets you TR-49, Expelled, and A Highland Song for paying at least $12. If you go for the $20 tier, you get four e-books from the Heaven's Vault series. The bundle has almost three weeks on its counter before it goes away. Big Deals There is a larger than normal amount of weekend specials happening this time, including multiple publisher deals, franchise discounts, and indie gems to grab. With those and more, here's our hand-picked big deals list for the weekend: Anno 117: Pax Romana – $44.99 on Steam Clair Obscur: Expedition 33 – $39.99 on Steam Timberborn – $27.99 on Steam EARTH DEFENSE FORCE 6 – $26.39 on Steam Rust – $19.99 on Steam FINAL FANTASY VII REBIRTH – $19.99 on Steam Street Fighter 6 – $19.99 on Steam Returnal – $19.79 on Steam Shape of Dreams – $17.49 on Steam Far Cry 6 – $14.99 on Steam Assassin's Creed Valhalla – $14.99 on Steam Quarantine Zone: The Last Check – $14.99 on Steam REMATCH – $14.99 on Steam EA SPORTS FC 26 – $13.99 on Steam FINAL FANTASY VII REMAKE INTERGRADE – $13.99 on Steam Magicraft – $12.79 on Steam Cult of the Lamb – $12.49 on Steam Dying Light 2: Reloaded Edition – $11.99 on Steam Cuphead – $11.99 on Steam Assassin's Creed Odyssey – $11.99 on Steam Hunt: Showdown 1896 – $11.99 on Steam Sektori – $11.99 on Steam Just Shapes & Beats – $11.99 on Steam Gunfire Reborn – $10.99 on Steam 33 Immortals – $9.99 on Epic Store Baby Steps – $9.99 on Steam Sifu – $9.99 on Steam Hearts of Iron IV – $9.99 on Steam DREDGE – $9.99 on Steam DAVE THE DIVER – $9.99 on Steam Pacific Drive – $9.89 on Steam Mycopunk – $9.74 on Steam Sons Of The Forest – $8.99 on Steam Jotunnslayer: Hordes of Hel – $8.99 on Steam Nuclear Throne – $8.99 on Steam Mechabellum – $8.99 on Steam Deep Rock Galactic: Survivor – $8.44 on Steam TerraTech Legion – $7.99 on Steam Inscryption – $7.99 on Steam Assassin's Creed Unity – $7.49 on Steam Minishoot' Adventures – $7.49 on Steam The Stanley Parable – $7.49 on Steam Oxygen Not Included – $7.49 on Steam Megabonk – $6.99 on Steam Look Outside – $5.99 on Steam Vampire Hunters – $5.24 on Steam MOTHERGUNSHIP – $4.99 on Steam My Friend Pedro – $3.99 on Steam The Messenger – $3.99 on Steam Vampire Survivors – $3.74 on Steam Brotato – $2.99 on Steam Enter the Gungeon – $2.99 on Steam Loop Hero – $2.99 on Steam GRIS – $2.99 on Steam Exit the Gungeon – $2.49 on Steam Hitman: Absolution – $1.99 on Steam CARRION – $1.99 on Steam Don't Starve Together – $1.49 on Steam Golf With Your Friends – $1.49 on Steam Hotline Miami – $0.99 on Steam The Ouroboros King – $0 on Epic Store Warhammer 40K Speed Freeks – $0 on Epic Store DRM-free Specials Hopping over to the DRM-free deals, the GOG store has plenty of discounts running this weekend too. Here are some highlights: Fallout 4: Game of the Year Edition - $15.99 on GOG Fallout: New Vegas Ultimate Edition - $9.99 on GOG Disco Elysium - The Final Cut - $9.99 on GOG Crysis - $9.99 on GOG Tyranny - Standard Edition - $7.49 on GOG Frostpunk: Game of the Year Edition - $7.35 on GOG Banished - $6.79 on GOG Fallout 3: Game of the Year Edition - $6.59 on GOG The Forgotten City - $6.25 on GOG The Age of Decadence - $5.99 on GOG SimCity 3000 Unlimited - $4.99 on GOG Assassin's Creed: Director's Cut - $4.99 on GOG SimCity 4 Deluxe Edition - $3.99 on GOG Vampyr - $3.99 on GOG Torchlight II - $3.99 on GOG Deus Ex GOTY Edition - $3.49 on GOG Primordia - $3.09 on GOG Theme Hospital - $2.99 on GOG SimCity 2000 Special Edition - $2.99 on GOG Total Annihilation: Kingdoms + Iron Plague - $2.99 on GOG Deus Ex: Human Revolution - Director’s Cut - $2.99 on GOG Master of Orion 1+2 - $2.39 on GOG Prince of Persia: The Sands of Time - $1.99 on GOG Prince of Persia: Warrior Within - $1.99 on GOG EVERSPACE - $1.99 on GOG Total Annihilation: Commander Pack - $0.99 on GOG Keep in mind that availability and pricing for some deals could vary depending on the region. That's it for our pick of this weekend's PC game deals, and hopefully, some of you have enough self-restraint not to keep adding to your ever-growing backlogs. As always, there are an enormous number of other deals ready and waiting all over the interwebs, as well as on services you may already subscribe to if you comb through them, so keep your eyes open for those, and have a great weekend.
    • When will the Photos app be updated to remember the window size and position when reopened? They addressed this issue in a 2024 version of the app (though I can't recall the build number). Unfortunately, after that specific version, the problem persists! Please prioritise this fix in your K2 schedule. Additionally, the Snipping Tool has lost the ability to capture the Windows Taskbar starting from the 2024 version!
    • Same, never saw it on Android or iOS. Guess only some people got it *shrugs*
  • Recent Achievements

    • Week One Done
      ssd21345 earned a badge
      Week One Done
    • Contributor
      MarkHughes4096 went up a rank
      Contributor
    • Dedicated
      jordanspringer earned a badge
      Dedicated
    • Rookie
      Rimplesnort went up a rank
      Rookie
    • One Year In
      Markus94287 earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      498
    2. 2
      +Edouard
      175
    3. 3
      PsYcHoKiLLa
      143
    4. 4
      ATLien_0
      92
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!