Scanner

K

Kent

Hello all,
Thank you in advance. I am trying to write an application in VB.Net
that will show the data that is in a barcode in a textbox. I can deploy
the application to the scanner (Intermec CK31) but when I scan the
barcode nothing happens. I just get a beep. I have tried running the
sample application that came with in the Intermec Resource Kit and I
get the same thing (nothing). You will find the code below. Any help
would be GREATLY appreciated.


Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents bcr As Intermec.DataCollection.BarcodeReader

Private Sub BarcodeRead(ByVal sender As System.Object, ByVal e As
Intermec.DataCollection.BarcodeReadEventArgs)
TextBox1.Text = e.strDataBuffer
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
bcr.Dispose()
Me.Close()
End Sub


Again I am just trying to get my application to recognize a barcode. I
can use the ScanDemo that came on the scanner and read the barcode. I
have a 2D barcode and an UPC.
Thanks Again
 
C

chris-s

It could be something to do with the 'symbology' settings. Have you
tried doing something like opening up a new pocket word document and
scanning a code.

Any validated code should appear in the document. If this does not
work, do a cold reset and try again.

If it still does not work, try a different barcode format, eg EAN and
check the symbology settings found under 'Settings->System->Intermec
Settings->Data Collection->Internal Scanner.

Cheers

Chris
 
K

Kent

It could be something to do with the 'symbology' settings. Have you
tried doing something like opening up a new pocket word document and
scanning a code.

Any validated code should appear in the document. If this does not
work, do a cold reset and try again.

If it still does not work, try a different barcode format, eg EAN and
check the symbology settings found under 'Settings->System->Intermec
Settings->Data Collection->Internal Scanner.

Cheers

Chris





Chris,
Thank you for your help. I opened up wordpad and scanned a barcode.
That works fine. Do you have any other ideas?
Thanks again,
Kent
 
D

Darren Beckley

If that code is really all there is in your app, then you are missing some
important steps. First of all you need to initialize an instance of the
BarcodeReader object, then you need to use either Read or ThreadedRead to
start reading. Try adding this in form constructor or Form.Load:

bcr = New BarcodeReader
bcr.ThreadedRead(True)

You also need to hook up the event handler with the event. Add " Handles
bcr.BarcodeRead" to your event handler, e.g.

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

Hope that helps,
Darren
 
K

Kent

Darren,
Thank you for you time. I did have that code you mentioned but I forgot
to paste it in. When I scan the barcode the scanner beeps and the light
turns green. For some reason it is not getting into the event handler.
Any other ideas?

Thanks again for you time,
Kent
 
K

Kent

Below you will find all of the code:


Public Class Form1
Inherits System.Windows.Forms.Form
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents bcr As Intermec.DataCollection.BarcodeReader

#Region " Windows Form Designer generated code "

Public Sub New()

MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call
Try
bcr = New Intermec.DataCollection.BarcodeReader
Catch ex As Intermec.DataCollection.BarcodeReaderException
MsgBox(ex.Message)
Me.Close()
Catch
MsgBox("Make sure that ITCScan.DLL is in the \Windows
directory")
Me.Close()
End Try

bcr.ThreadedRead(True)
Button1.Focus()

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
MyBase.Dispose(disposing)
End Sub

'NOTE: The following procedure is required by the Windows Form
Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(16, 56)
Me.Button1.Text = "Button1"
'
'Form1
'
Me.ClientSize = New System.Drawing.Size(130, 111)
Me.ControlBox = False
Me.Controls.Add(Me.Button1)
Me.Text = "Barcode Sample"

End Sub

Public Shared Sub Main()
Application.Run(New Form1)
End Sub

#End Region

Private Sub BarcodeRead(ByVal sender As System.Object, ByVal e As
Intermec.DataCollection.BarcodeReadEventArgs) Handles bcr.BarcodeRead
MsgBox("here")
MsgBox(e.strDataBuffer)
End Sub


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
bcr.Dispose()
Me.Close()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
MessageBox.Show(bcr.ScannerEnable & " " & bcr.ScannerOn)
End Sub
End Class




Thanks again,
Kent
 
K

Kent

UPDATE:

If I don't use any BarCodeReader classes and just place a textbox on
the form the application works. When I try to use the BarCodeReader the
events don't fire.

Thanks again,
Kent
 
M

Martin Robins

Kent,

I have not tried the CK31, but I can confirm that the code for the example
works fine when used on the 700 series.

Can you confirm the version of the .NET CF that you are using; I have had
problems when using CF2.0 (although these are easily overcome). Can you also
confirm the version of the Intermec data collection toolkit you are using -
not just the assembly version of Intermec.DataCollection.dll as this does
not always change, what version of the library did you install?

Martin.
 
K

Kent

Martin,
I am using Intermec v2.0 according to the readme.htm. I just downloaded
it yesterday. I am using the CF2.0 with VS 2003.

Thanks for taking time to help me,
Kent
 
M

Martin Robins

Kent,

Try disabling the keyboard wedge on the device; it sounds like the two are
clashing.

If you are using PPC2003, Start -> Settings -> System -> Intermec Settings;
Select Data Collection and then Virtual Wedge, ensure that the Virtual Wedge
tickbox is not checked.

Failing this, attach your code as-is (or email me directly) and I will try
it on my device.

Martin.
 
K

Kent

Martin said:
Kent,

Try disabling the keyboard wedge on the device; it sounds like the two are
clashing.

If you are using PPC2003, Start -> Settings -> System -> Intermec Settings;
Select Data Collection and then Virtual Wedge, ensure that the Virtual Wedge
tickbox is not checked.

Failing this, attach your code as-is (or email me directly) and I will try
it on my device.

Martin.


Martin,
Thank you for your help. I won't be back to the office until Monday.
When I get in I will try it. How do I disable the wedge on Windows CE?

Thanks Again,
Kent
 
K

Kent

Kent said:
Martin,
Thank you for your help. I won't be back to the office until Monday.
When I get in I will try it. How do I disable the wedge on Windows CE?

Thanks Again,
Kent


Martin,
I have disabled the virtual wedge and it still does not work. Could you
please email me ([email protected] is valid and I check it
everyday.)

Thanks again,
Kent
 
G

Ginny Caughey [MVP]

Kent,

As far as I know, VS 2003 only supports CF 1. You have the option to support
either version of CF with VS 2005.
 
K

Kent

I think I have CF 2.0. I know for sure I am using VS 2003. The reason I
think I am using CF 2.0 is I have the following folder structure:
C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0. Where can I
download CF1 at?

Thanks,
Kent
 
D

Darren Beckley

Kent,

I have built your code in VS2003 and tried it on a CK31 - it works fine for
me. I am using CK31 OS 3.00.00.0732. You can see this version on the default
home page in Internet Explorer, or from Start -> Programs -> Intermec
Diagnostics -> Software -> OS Version. If you are running an old OS, you
could try upgrading. You can download CK3x OSes here:

http://www.intermec.com/eprise/main/Intermec/Content/Search/Results?List=Downloads&search_text=ck31

I am using Intermec.DataCollection.dll version 1.1.0.1 from the Data
Collection Resource Kit in Intermec Developers Library (IDL) 2.1. You
mentioned you had IDL 2.0, but 2.1 has been the current version for some
time now. Please double-check the version in the readme file at C:\Program
Files\Intermec\Developer Library\readme.htm. You can download the latest
version from http://www.intermec.com/idl.

If you are using VS2003, then you are targeting CF v1.0. With the version of
the OS above, you will find that CF v1.0 SP3 is already installed on the
CK31. You can run \Windows\cgacutil.exe to check the version - compare the
version it gives with this chart to see what's installed:

http://wiki.opennetcf.org/ow.asp?CompactFrameworkFAQ/DeterminingVersion

If for some reason you have installed CF v2.0 on the CK31, try uninstalling
it. That might fix the problem. Other than that, I don't see what else you
are doing wrong here.

If you want to raise a support call to get help from Intermec, you can do so
at http://intermec.custhelp.com.

Hope that helps,
Darren
 
K

Kent

Darren,
Thank you for the help. I am using CE Build Version 2.00.10.0505
Premium. I am in fact using "(RELEASE 2.1) README.HTM". Also, I am
using Microsoft .NET Compact Framework 1.0.3316.00 in the CK31.

Do you think it is the CE Build Version causing the issue?

Thanks again for your help,
Kent
 
C

Chris Tacke, eMVP

If that's right, then there's certainly the problem. The CF is supported
only on CE 3.0 and later, and CE 3.0 only when it's a PPC.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
 
K

Kent

Chris,
If I go into the System Properties of My Computer. Is says I am using
"Microsoft Windows CE .NET Version 4.20". I think the version Darren
was talking about is the version of the Intermec Software build. Do you
have any other info that may help?

Thanks again for you help,
Kent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top