我有摩托羅拉手持式MC55A與Windows嵌入式掌上電腦6.5,我想開始開發一個應用程序來讀條碼。我沒有找到任何參考做我的命令 我已經安裝了VS2008,並開始創建智能使用簡單表格的設備應用程序摩托羅拉手持式MC55A開發
0
A
回答
0
值得稱道的優點:最初我沒有寫下面的代碼,我不確定誰最初做過它,可能是由符號開發人員編寫的......我不確定,我只用過它。 1-首先下載並安裝Motorola EMDK,之後,您將複製C:\ Program Files(x86)\ Motorola EMDK for .NET \ v2.5 \ SDK \ Smart Devices \ Symbol.Barcode .dll文件放到您的口袋裏的\ My Device \ Windows文件夾中。
Public Class frmTest
Dim MyReader As Symbol.Barcode.Reader = Nothing
Dim MyReaderData As Symbol.Barcode.ReaderData = Nothing
Dim MyEventHandler As System.EventHandler = Nothing
Dim MyHandlerCB As System.EventHandler = Nothing
Private Sub frmTest_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
InitReader()
End Sub
Protected Overloads Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)
StopRead()
Me.TermReader()
MyBase.OnClosing(e)
End Sub
Private Function InitReader() As Boolean
' If reader is already present then fail initialize
If Not (Me.MyReader Is Nothing) Then
Return False
End If
'Create new reader, first available reader will be used.
Me.MyReader = New Symbol.Barcode.Reader
'Create reader data
Me.MyReaderData = New Symbol.Barcode.ReaderData(_
Symbol.Barcode.ReaderDataTypes.Text, _
Symbol.Barcode.ReaderDataLengths.DefaultText)
' create event handler delegate
Me.MyEventHandler = New System.EventHandler(AddressOf MyReader_ReadNotify)
'Enable reader, with wait cursor
Me.MyReader.Actions.Enable()
Return True
End Function
Private Sub TermReader()
'If we have a reader
If Not (Me.MyReader Is Nothing) Then
'Disable reader, with wait cursor
Me.MyReader.Actions.Disable()
'free it up
Me.MyReader.Dispose()
' Indicate we no longer have one
Me.MyReader = Nothing
End If
' If we have a reader data
If Not (Me.MyReaderData Is Nothing) Then
'Free it up
Me.MyReaderData.Dispose()
'Indicate we no longer have one
Me.MyReaderData = Nothing
End If
End Sub
Private Sub StartRead()
'If we have both a reader and a reader data
If Not ((Me.MyReader Is Nothing) And (Me.MyReaderData Is Nothing)) Then
'Submit a read
AddHandler MyReader.ReadNotify, Me.MyEventHandler
Me.MyReader.Actions.Read(Me.MyReaderData)
End If
End Sub
Private Sub StopRead()
'If we have a reader
If Not (Me.MyReader Is Nothing) Then
'Flush (Cancel all pending reads)
RemoveHandler MyReader.ReadNotify, Me.MyEventHandler
Me.MyReader.Actions.Flush()
End If
End Sub
Private Sub MyReader_ReadNotify(ByVal o As Object, ByVal e As EventArgs)
Dim TheReaderData As Symbol.Barcode.ReaderData = Me.MyReader.GetNextReaderData()
'If it is a successful read (as opposed to a failed one)
If (TheReaderData.Result = Symbol.Results.SUCCESS) Then
'Handle the data from this read
Me.HandleData(TheReaderData)
'Start the next read
Me.StartRead()
End If
End Sub
Private Sub HandleData(ByVal TheReaderData As Symbol.Barcode.ReaderData)
txtBarCode.Text = TheReaderData.Text
End Sub
Private Sub txtBarCode_GotFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBarCode.GotFocus
StartRead()
End Sub
Private Sub txtBarCode_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBarCode.LostFocus
StopRead()
End Sub
末級
0
您想要掃描條形碼並將它們插入到應用程序的文本框中? 嘗試從控制面板啓用Data Wedge。
相關問題
- 1. 摩托羅拉手持終端條形碼掃描在背景
- 2. Kannel的與摩托羅拉
- 3. 摩托羅拉J290 HttpConnection i290
- 4. Scanwedge/Datawedge摩托羅拉MC3100
- 5. 摩托羅拉Symbol MC3090
- 6. 摩托羅拉XOOM瀏覽器格式
- 7. 打開摩托羅拉XYBoard上的手電筒
- 8. 如何定義單獨的佈局摩托羅拉Atrix和摩托羅拉Droid
- 9. 使用摩托羅拉XOOM完成開發
- 10. 宏達摩托羅拉仿真器
- 11. 摩托羅拉掃描儀SDK VB.NET
- 12. 摩托羅拉LS1203條碼掃描器
- 13. 摩托羅拉Milestone中的ScrollView問題
- 14. 摩托羅拉Xoom PDF/PPT查看
- 15. Android 4.0.4 BLE API,BroadCom - 摩托羅拉
- 16. 相機預覽上摩托羅拉Droid
- 17. 亞行不檢測摩托羅拉Droid
- 18. 摩托羅拉68000組件比較號
- 19. 調試摩托羅拉勝利
- 20. 摩托羅拉Atrix MB860和xe5
- 21. 符號摩托羅拉MC65和datawedge
- 22. 摩托羅拉ES400符號通知
- 23. Android模擬器HTC /摩托羅拉
- 24. devicePolicyManager.lockNow()不工作摩托羅拉片
- 25. 摩托羅拉mc3190掛過程
- 26. 摩托羅拉Xoom XML清單
- 27. EMDK摩托羅拉ES400程序GPS NET
- 28. 摩托羅拉ET1 android模擬器
- 29. 摩托羅拉MC75的應用程序
- 30. 需要摩托羅拉Atrix幫助
感謝您comment.i開始使用摩托羅拉EMDK V2.8來開發我的應用程序。 – user2046177