开发者

Can we detect the laptop battery level using .net?

开发者 https://www.devze.com 2022-12-15 13:15 出处:网络
I would like to detect the laptop battery level so that I can warn of low battery level using my application is it 开发者_Go百科possible in .net ? Thanks in advance.Have a look at

I would like to detect the laptop battery level so that I can warn of low battery level using my application is it 开发者_Go百科possible in .net ? Thanks in advance.


Have a look at

SystemInformation.PowerStatus


SystemInformation.PowerStatus should help you.


Here is code you can pretty much cut and paste: Hangout with Sharp - C# - Battery Status Monitor


Very first hit on google was this article. it appears to be what you are looking for. There is an even simpler version on Coding4Fun.

0

精彩评论

暂无评论...
验证码 换一张
取 消