Barcode application hangs after MessageBox

  • Thread starter Thread starter kenanmengu
  • Start date Start date
K

kenanmengu

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
 
I think you are using an 'old' version on the barcodereader class. I
would contact developer support and ask for software updates.

R.
 
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.
 
Hi Martin,

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

Kenan
 
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.
 
Back
Top