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

    • My father still uses a programme written in dbase3. Still manages to work with a little help from dosbox. 
    • Microsoft hides these secret Windows 11 performance boost settings available on every PC by Sayan Sen Windows enthusiasts often look for ways to extract as much performance out of their systems as possible, and it's often the case that they try and do so while trying to minimize the heat and power consumption. This is especially relevant in the case of mobile Windows PCs since laptops and notebooks tend to get hot and management of that heat and power is harder in such a form factor. As such users often turn to techniques like under-volting which can be used to squeeze out the maximum capabilities of a chip while also maintaining lowered power levels. There are official apps from AMD and Intel with the likes of Ryzen Master and XTU (Extreme Tuning Utility). While these are quite handy, most enthusiasts probably prefer to dig into the BIOS and play around with settings there like Curve Optimizer on Ryzen, which lets users set various frequency-voltage scaling values. These are essentially called P-States. If you are not familiar with them, Processor Power Management is done through Advanced Configuration and Power Interface (ACPI) P-states and C-states. While P-states or performance pwoer states handle CPU voltage-frequency scaling, C-states deal with CPU sleep states so that some of the CPU functions, which are not necessary at that moment, can be disabled. The P-states and C-states work together to make the processor run more efficiently. It helps the OS and apps determine which cores can be parked and which should be boosted. Of course not every user is an enthusiast or knows the technicalities and integrities of how things like overclocking or undervolting work. Thankfully for them Windows itself offers something pretty cool, though it is hidden by default on all systems. By default, Windows only has two P-States, "Minimum Processor State" and "Maximum Processor State." However, this can be changed with a Registry trick to expand the options under a secret "Processor performance boost mode" dropdown. This essentially enables the HWP or hardware P-States available on a device, and these are not controlled just by the OS itself as the underlying hardware gets involved too. In total there are five Processor Performance Boost Mode profiles that control how Windows requests and allows CPU turbo/boost behavior under the different power policies. They are: Disabled: In this mode, processor boosting is effectively turned off. The CPU will avoid entering turbo or boost frequencies and instead operate closer to its base frequency ceiling. This can significantly reduce power consumption and heat output, but at the cost of reduced burst performance and responsiveness in short workloads. Enabled: This is the standard behavior where boost functionality is allowed under normal conditions. The processor can opportunistically increase frequency when workload demands it, balancing performance gains with power and thermal constraints as managed by the system. Aggressive: Aggressive mode favors performance more heavily, allowing the CPU to enter higher boost states more readily and sustain them longer. This should in theory improve responsiveness under bursty or heavy workloads but increases power draw and thermal output compared to the default enabled behavior. Efficient Enabled: This mode still allows boosting, but with a stronger bias toward energy efficiency. The system attempts to use boost more selectively, avoiding unnecessary frequency spikes when the performance gain is marginal. Efficient Aggressive: This is a hybrid approach where boost is still performance-responsive, but the system continuously weighs efficiency more heavily than in Aggressive mode. It aims to deliver noticeable performance improvements while reducing wasted power in less demanding scenarios. Here's how to enable the Processor performance boost mode: Open Registry Editor: Press Win+R, type regedit, and click OK. Go to: HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\be337238-0d82-4146-a960-4f3749d470c7 (where HKLM stands for HKEY_LOCAL_MACHINE_) Modify the value of Attributes from 1 to 2 (you can find modify option by right-clicking) After that, exit Registry, you should now be able to see the new "Processor performance boost mode" dropdown menu: As you can see there are now five new P-States or CPPC states or power profile available that help define the boost mode processor setting on your PC. Wrapping it up here's a quick run-down of the settings as defined by Microsoft itself. Setting Description Disabled The corresponding P-state-based behaviour is disabled. Collaborative Processor Performance Control (CPPC) behaviour is disabled. Enabled The corresponding P-state-based behaviour is enabled. CPPC behaviour is Efficient Enabled. Aggressive The corresponding P-state-based behaviour is enabled. CPPC behaviour is Aggressive. Efficient Enabled The corresponding P-state-based behaviour is Efficient. CPPC behaviour is Efficient Enabled. Efficient Aggressive The corresponding P-state-based behaviour is Efficient. CPPC behaviour is Aggressive. Aggressive At Guaranteed Windows calculates the desired extra performance above the guaranteed performance level, and asks the processor to deliver that specific performance level. Efficient Aggressive At Guaranteed Windows always asks the processor to deliver the highest possible performance above the guaranteed performance level. In the next part we shall be comparing these settings to explore how much of a benefit or regression they can provide in terms of performance and power efficiency. If you decide to change the values on your system and are experiencing problems like crashes or an overheating PC, make sure to revert the steps back to the original state.
    • I think he means you haven't reviewed previous UFC games. Of course it doesn't matter... Every time you just report on something that involves the President even if just simply what happened you guys usually get accused of being anti-Trump. We live in fun times.
  • Recent Achievements

    • Week One Done
      rolfus earned a badge
      Week One Done
    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
    • One Month Later
      AndreaB earned a badge
      One Month Later
    • One Month Later
      agatameier earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      518
    2. 2
      +Edouard
      198
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      93
    5. 5
      Steven P.
      78
  • Tell a friend

    Love Neowin? Tell a friend!