BarcodeReader.ScannerEnable Property

Enables or disables the scanner port.

Namespace: Honeywell.Mobility.DataCollection

Assembly: Honeywell.Mobility.DataCollection.FF3.5 (in Honeywell.Mobility.DataCollection.FF3.5.dll)

[C#]
public bool ScannerEnable { get ; set ; }
[Visual Basic (Declaration)]
Public Property ScannerEnable As Boolean Get Set

Property Value

true = Enables the scanner port.

false = Disables the scanner port.

Examples

[C#]
using Honeywell.Mobility.DataCollection;
namespace DataCollection
{
    public partial class frmBarcodeReader : Form
    {
        private Honeywell.Mobility.DataCollection.BarcodeReader bcr;

        public frmBarcodeReader()
        {
            InitializeComponent();

            try
            {
                bcr = new Honeywell.Mobility.DataCollection.BarcodeReader();
                bcr.BarcodeRead += new BarcodeReadEventHandler(bcr1_BarcodeRead);
                bcr.PostRead = true;
                bcr.ScannerEnable = true;
            }
            catch (BarcodeReaderException bcrexp)
            {
                MessageBox.Show(bcrexp.Message);
            }
        }
        void bcr_BarcodeRead(object sender, Honeywell.Mobility.DataCollection.BarcodeReadEventArgs bre)
        {
            try
            {
                this.listBox1.Items.Add("strBarcodeData = " + bre.strBarcodeData);
                this.listBox1.Items.Add("SymbologyId = " + bre.SymbologyId);
                this.listBox1.Items.Add("SymbologyName = " + bre.SymbologyName);
                this.listBox1.Items.Add("DataType = " + bre.DataType);
                this.listBox1.Items.Add("BytesInBuffer = " + bre.BytesInBuffer);
                this.listBox1.Items.Add("PortID = " + bre.PortID);
                this.listBox1.Items.Add("PortName = " + bre.PortName);
                this.listBox1.Items.Add("PortDeviceType = " + bre.PortDeviceType);
            }
            catch (BarcodeReaderException bcrexp)
            {
                MessageBox.Show(bcrexp.Message);
            }
        }
    }
}
[VB.NET]
Imports Honeywell.Mobility.DataCollection
Public Class BarcodeReader
    Private WithEvents bcr As Honeywell.Mobility.DataCollection.BarcodeReader

    Private Sub BarcodeReader_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            bcr = New Honeywell.Mobility.DataCollection.BarcodeReader()
            bcr.PostRead = true
            bcr.ScannerEnable = true
        Catch bcrexp As BarcodeReaderException
            MessageBox.Show(bcrexp.Message)
        End Try
    End Sub
Enc Class

Exceptions

BarcodeReaderException throws an exception when an error has occurred on bar code read methods and properties.

More Information

BarcodeReader Class