开发者

Is there a barcode reader API in Windows Mobile 5.0/6.0?

How can barcodes be read on Windows Mobile devices?

The reader I am using states that it will support Windows Mobi开发者_运维百科le 5.0, 6.0 and 6.5 phones.


Most mobile devices read the barcode like it is text, so the work is taken care of for you already.

Place a text box on your form, make sure that text box has the focus (that's the biggest training issue we have here), and handle the Text_Changed event.

Here's a quasi-code example:

TextBox textBox1;

void textBox1_Tex(object sender, EventArgs e) {
  MessageBox.Show(textBox.Text);
}


There is no universal API in the .NET Compact Framework or through P/Invoke.

The manufacturer may provide an SDK for reading barcodes. For example Motorola provide what they call an 'EMDK' to read barcodes on their devices.

Alternatively, some devices will read the barcodes as plain text from a serial port. Just open the serial port and read what comes in.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜