开发者

Can we detect the laptop battery level using .net?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜