Want to show popup notification for "low battery"
-
Hi I am developing Smart Device Application using .NCF 1.0(vb) with Windows CE 5.0 Want to show popup notification for "low battery" Please help me on this. Thanks in advance Yogesh Rishipathak
Hii, Try this code.........
Dim psBattery As PowerStatus = SystemInformation.PowerStatus
Dim perFull As Single = psBattery.BatteryLifePercent
'Show the remaining battery power in percentages
MsgBox("Total battery power remaining: " & perFull * 100 & "%")
'Is the battery charging?
If psBattery.PowerLineStatus = PowerLineStatus.Online Then
MsgBox("Battery charge status: Charging")
ElseIf psBattery.PowerLineStatus = PowerLineStatus.Offline Then
MsgBox("Battery charge status: Not charging")
End IfHope this solves ur problem...... Thanks
~Khatri Mitesh khatrimitesh@hotmail.com Bikaner (Rajasthan) INDIA
-
Hii, Try this code.........
Dim psBattery As PowerStatus = SystemInformation.PowerStatus
Dim perFull As Single = psBattery.BatteryLifePercent
'Show the remaining battery power in percentages
MsgBox("Total battery power remaining: " & perFull * 100 & "%")
'Is the battery charging?
If psBattery.PowerLineStatus = PowerLineStatus.Online Then
MsgBox("Battery charge status: Charging")
ElseIf psBattery.PowerLineStatus = PowerLineStatus.Offline Then
MsgBox("Battery charge status: Not charging")
End IfHope this solves ur problem...... Thanks
~Khatri Mitesh khatrimitesh@hotmail.com Bikaner (Rajasthan) INDIA