Scanner Examples

As of Version 3.5.0., the Scanner object encompasses both the Symbol and Intermec scanner interfaces, the scanner DLLs are now dynamically loaded to a single executable file.

Both Symbol and Intermec objects are now deprecated.

Example 1. Turn the scanner on.

Scanner.OpenScanner()

Note:

Example 2. Perform a scan and display an error if one exists.

Variable1 = Scanner.Scan()

IF Variable1 <> 0

{

   Form.MessageBox("Scan Error code", Variable1, MB_OK)

}

Note:

Example 3. Check the scan result and if successful assign scan values to form controls.

IF Scanner.GetScanResult() == 0

{

   edit_control1 = Scanner.GetBarcode()

   edit_control2 = Scanner.GetBarcodeType()

}

Note:

Example 4. Turn the scanner off.

Scanner.CloseScanner()

Note: