Groups | Blog | Home
all groups > dotnet compact framework > january 2006 >

dotnet compact framework : Barcode application hangs after MessageBox



kenanmengu NO[at]SPAM hotmail.com
1/31/2006 7:11:13 AM
Hi,

I am developing a NETCF app running in intermec 730.
I've downloaded Intermec SDK and successfully run the barcode sample
provided by SDK.
But when i slightly changed the original code application hangs..

What's wrong with this code?

'**************************************************
Private Sub BarcodeRead(ByVal sender As System.Object, ByVal e As
Intermec.DataCollection.BarcodeReadEventArgs)

MsgBox("Barcode scanned")
' Application hangs here. If I remove MsgBox everything goes OK



Dim LItem As New ListViewItem(e.strDataBuffer)
LItem.SubItems.Add(New ListViewItem.ListViewSubItem)
Me.ListView1.Items.Add(LItem)

End Sub
Ronald
1/31/2006 8:01:16 AM
I think you are using an 'old' version on the barcodereader class. I
would contact developer support and ask for software updates.

R.

[quoted text, click to view]
kenanmengu NO[at]SPAM hotmail.com
1/31/2006 10:19:49 AM
Hi Martin,

I'm using ThreadedRead method of BarcodeReader class.
How can I invoke the event handler on the current thread?

Kenan

[quoted text, click to view]
Martin Robins
1/31/2006 5:42:18 PM
Another option is that you are using ThreadedRead which fires the event on a
thread other than that running the UI. If this is the case then you will
need to invoke the event handler on the current thread instead.

Martin.

[quoted text, click to view]

Martin Robins
2/10/2006 8:03:28 PM
Sorry for the delay in answering;

Private Sub BarcodeRead(ByVal sender As System.Object, ByVal e As
Intermec.DataCollection.BarcodeReadEventArgs)

If Me.RequiresInvoke Then
Me.Invoke (new BarcodeReadEventHandler(Me.BarcodeRead, sender, e))
Else
MessageBox.Show(...)
End If

End Sub

(typed on the fly by a c# lover but the general principle should be
correct!)

Martin.


[quoted text, click to view]

AddThis Social Bookmark Button