2
A
回答
9
你可以試試這個代碼
Dim power As SystemInformation.PowerStatus = SystemInformation.PowerStatus
Dim percent As Single = power.BatteryLifePercent
MsgBox("Percent battery life remaining: " & percent * 100)
6
查看SystemInformation類,更具體地說,PowerStatus屬性(它返回PowerStatus class的實例)。
下面的代碼會給你當前的電池信息:
Dim powerstatus As PowerStatus = SystemInformation.PowerStatus
' Gets the current battery charge status.
MessageBox.Show("BatteryChargeStatus : " & powerstatus.BatteryChargeStatus)
' Gets the reported full charge lifetime of the primary battery power source in seconds.
MessageBox.Show("BatteryFullLifetime : " & powerstatus.BatteryFullLifetime)
' Gets the approximate amount of full battery charge remaining.
MessageBox.Show("BatteryLifePercent : " & powerstatus.BatteryLifePercent)
' Gets the approximate number of seconds of battery time remaining.
MessageBox.Show("BatteryLifeRemaining : " & powerstatus.BatteryLifeRemaining)
' Gets the current system power status.
MessageBox.Show("PowerLineStatus : " & powerstatus.PowerLineStatus)
相關問題
- 1. 在我的筆記本電腦中僞造電池信息
- 2. 電池的使用壽命
- 3. 從java監控筆記本電腦或筆記本電腦電源
- 4. 閱讀筆記本電腦當前的電池充電/放電速率
- 5. 如何檢測筆記本電腦在.NET電池上運行的時間?
- 6. Android registerListener和電池壽命
- 7. 使用mediaDevices.getUserMedia在筆記本電腦上
- 8. 平板電腦上的不同視圖比筆記本電腦
- 9. Spyder的筆記本電腦的Python 2.7
- 10. IPython的筆記本電腦連接到外部的筆記本
- 11. 如何檢查Jupyter通過命令行運行的筆記本電腦
- 12. 我可以使用我的筆記本電腦的手機gps
- 13. 的Android FusedLocationProvider和電池壽命
- 14. 計算iOS中的電池壽命
- 15. 在筆記本電腦和主電腦上同步我的工作?
- 16. 筆記本電腦回環問題
- 17. 問題與64位筆記本電腦
- 18. 筆記本電腦開蓋效果
- 19. r筆記本電腦繪製線條
- 20. Jupyter筆記本電腦顯示代碼
- 21. 如何從GitHub Jupyter筆記本電腦
- 22. 如何在Google Analytics報告中過濾筆記本電腦/筆記本電腦用戶
- 23. 檢測筆記本電腦的蓋子關閉和開啓的
- 24. 用Labview排出3V鈕釦電池來測試電池的使用壽命?
- 25. 我可以寫一個實際提醒我的筆記本電腦電池的c程序嗎?
- 26. Jupyter筆記本電腦:借鑑筆記本電腦的圖形,而不是將文件保存到磁盤
- 27. 筆記本電腦/平板電腦BatteryCycleCount用於確定其健康狀況
- 28. 的Perl返回MSWin32而我的筆記本電腦是64位
- 29. 如何多線程的Python我的筆記本電腦
- 30. 我的筆記本電腦的向下箭頭鍵?
這裏是現成的代碼 - http://syntaxhelp.com/VB.NET/Retrieve - 電池 - 信息 – 2012-04-27 08:57:29