Windows mobile 摩托罗拉MC3190条形码扫描仪未触发

Windows mobile 摩托罗拉MC3190条形码扫描仪未触发,windows-mobile,windows-ce,motorola-emdk,compact-framework2.0,Windows Mobile,Windows Ce,Motorola Emdk,Compact Framework2.0,我正在尝试让我的摩托罗拉MC3190读取条形码。但不幸的是,按下硬件扫描按钮后没有响应。我正在为.net 2.0版使用EMDK 这是我的密码: private void Form1_Load(object sender, EventArgs e) { // Get the first scanning device (Its named SCN1 in my device) myDevice = Symbol.Barcode.De

我正在尝试让我的摩托罗拉MC3190读取条形码。但不幸的是,按下硬件扫描按钮后没有响应。我正在为.net 2.0版使用EMDK

这是我的密码:

private void Form1_Load(object sender, EventArgs e)
        {
            // Get the first scanning device (Its named SCN1 in my device) 
            myDevice = Symbol.Barcode.Device.AvailableDevices[0];
            myReader = new Reader(myDevice);

            // Make sure the Code-128 decoder is enabled!
            myReader.Decoders.CODE128.Enabled = true;

            // Create an instance of reader
            myReaderData = new Symbol.Barcode.ReaderData(Symbol.Barcode.ReaderDataTypes.Text, Symbol.Barcode.ReaderDataLengths.MaximumLabel);

            // Set the event handler
            myReader.ReadNotify += new EventHandler(myReader_ReadNotify);

            // enable and get ready to read
            myReader.Actions.Enable();
            myReader.Actions.Read(myReaderData);
        }
在我的情况下,我只是尝试显示解码文本:

void myReader_ReadNotify(object sender, EventArgs e)
        {
            Symbol.Barcode.ReaderData nextReaderData = myReader.GetNextReaderData();
            this.listBox1.Items.Add(nextReaderData.Text);            
            switch (nextReaderData.Result)
            {
                case Symbol.Results.SUCCESS:
                    this.listBox1.Items.Add(nextReaderData.Text);
                    myReader.Actions.Read(myReaderData);
                    break;

                case Symbol.Results.CANCELED:
                    this.listBox1.Items.Add("Canceled!!");
                    break;

                default:
                    string sMsg = "Read Failed\n"
                    + "Result = "
                    + ((int)nextReaderData.Result).ToString("X8");
                    MessageBox.Show(sMsg, "ReadNotify");
                    break;
            }


        }
我没有收到任何错误消息。同时,如果我列出可用的扫描设备,我可以看到我的设备,即(SCN1)。我需要做什么特殊的事情来触发硬件密钥吗


非常感谢为解决此问题提供的任何帮助/想法。谢谢

有时,摩托罗拉的单元会随DataWedge应用程序一起安装。当使用EMDK时,它可能会声称可以访问扫描仪,并导致许多问题。确保已禁用或卸载它。

在您的设备设置中,条形码阅读器是否已打开?(只是先把这些因素排除在外)

在我们的设备中,我们只是将条形码阅读器视为任何其他形式的文本输入

我的表单上有一个
TextBox
控件,客户(我们的员工)选择该
TextBox
,将设备指向标签,然后扫描条形码


我所做的就是读取
TextBox1.Text
字段。

我不太确定此设备是否为不同的硬件使用相同的COM端口。如果选择COM端口以使用条形码扫描仪,请签入设置。在具有大量硬件的设备中,COM端口是共享的

此外,如果您关闭应用程序并按下黄色按钮,条形码光束是否会显示

设备是否支持您的条形码类型


正如@jp2code所说,对于基本功能,您可以使用DataWedge并以文本形式接收数据输入。

在您的
myReader\u ReadNotify
功能中,在第4行之后和第5行之前(开关)放置以下行:

myReader.Actions.Read(myReaderData);

我们得到了一个预安装的应用程序,可以成功读取条形码。因此,读卡器没有关闭。我将尝试在文本框中阅读。