Sample Applications A-11
//***********************************************************
//* Enable UPCA Barcodes only
//**********************************************************
Ultra.Scan.UPCEAN UPC = new Ultra.Scan.UPCEAN();
// Instantiate UPCEAN class
UPC.EnableUPCA = true; // Enable UPCA
UPC.XmitUPCACD = true; // Xmit UPCA C/D
UPC.XmitUPCAPre =
Ultra.Scan.UPCEAN.eXMITUPCPREAMBLE.XUP_SYSCHAR;
// Ignores UPCA + 2, UPCA +5, EAN8 + 2, EAN8 +5, EAN13 +2 &
// EAN13 + 5 Symbologies
UPC.Supplemental =
Ultra.Scan.UPCEAN.eSUPPLEMENTAL.USM_IGNORE;
// --Save Changes to the Scanner Configuration which builds a
// new Ultra.cfg
CONTROL.CommitChanges();
// --Set focus to txtUPC text box
txtUPC.Focus();
}
//***********************************************************
//* txtData_KeyDown Event
//* Description:
//* Handle the KeyDown event to determine the
//* type of character entered into the control.
//* if Enter is Pressed, execute the btnEnter_Click Event
//***********************************************************
private void txtData_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
if (e.KeyCode.ToString() == "Return")
btnEnter_Click(sender, e);
}