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] <kenanmengu@hotmail.com> wrote in message
news:1138731589.162733.168300@g44g2000cwa.googlegroups.com...
> Hi Martin,
>
> I'm using ThreadedRead method of BarcodeReader class.
> How can I invoke the event handler on the current thread?
>
> Kenan
>
>> 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.
>>
>> <kenanmengu@hotmail.com> wrote in message
>> news:1138720273.771736.45250@o13g2000cwo.googlegroups.com...
>> > 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
>> >
>