3-4 Programmer’s Manual
Battery
IsBatteryOKToPrint
Description
Checks if the printer’s LiIon battery (located in the handle) is charged
enough to allow printing. Check the battery level before any printing
session.
Use this function immediately prior to printing, but not
during printing. If you use it during printing, the return
value is not accurate.
Syntax
public bool IsBatteryOKToPrint
Parameters
None
Return Values
FALSE
The battery level is too low to allow printing.
TRUE
The battery level is high enough to allow printing.
Example C#
using Ultra;
{
Ultra.Print rPrint = new Print(); //Instantiate class
rPrint.ClearError(); // Clear any errors
if (!rPrint.IsBatteryOKToPrint) // Not OK to Print
MessageBox.Show("Low Battery", "Battery Check");
}
Example VB.NET
Imports Ultra
Dim rPrint As New Print ' Instantiate class
rPrint.ClearError() ' Clear any errors
If (Not rPrint.IsBatteryOKToPrint) Then ' Not OK to Print?
MsgBox("Low Battery", MsgBoxStyle.OKOnly, "Battery Check")