Paxar 6039 Printer User Manual


 
Printing Functions 3-5
nBatteryLevel
Description
Retrieves the LiIon battery’s level. This battery is located in the printer’s
handle. This returns a value between 1 and 100, the percentage of
charge left in the battery. Check the battery level before any processing.
Use this function immediately prior to printing, but not
during printing. If you use this function during
printing, the return value is not accurate.
Syntax
public int nBatteryLevel
Parameters
None
Return Values
0
You must charge the battery.
1 –100
The battery level is high enough to run the printer and
print.
412
Could not retrieve the current battery level. Retry the
function.
Example C#
using Ultra;
{
int nStat;
Ultra.Print rPrint = new Print(); //Instantiate class
nStat = rPrint.nBatteryLevel;
MessageBox.Show("Battery at " + nStat.ToString() + "
%","Battery
Check",MessageBoxButtons.OK,MessageBoxIcon.Asterisk,MessageBo
xDefaultButton.Button1);
}