Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / March 2007

Tip: Looking for answers? Try searching our database.

using the OpennetCF.Barcode class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Milsnips - 19 Mar 2007 22:34 GMT
Hi there,

i'm doing some testing with a Socket 3E series SDIO scanner card on a
windows mobile device, all works fine and i can catch the eventhandler on a
good scan, but when i click scan, and during the time its scanning, if i
click the scan button again, it crashes with an exception.

For now, i'm just using try/catch, but it'd be better to be able to catch
some kind of "end scan" event so i can disable my "scan button", then
re-enable it when the scanner is ready.

Any ideas? As far as i can see there is no property/event here for this.

thanks,
Paul
Ryan - 20 Mar 2007 09:32 GMT
Hi Paul,

I've never used the OpenNetCF.Barcode class but I used to use the Socket
SDK for barcoding. What I used to do was have a class visible boolean to
indicate when the button had been press and then cleared this down in
the scan result event. i.e.

void btnScan_OnClick(object sender, EventArgs e){
  // Check to see if the scanner is active
  if(!ScanningInProgress){
    // If not set the flag to prevent a double trigger & GPF
    ScanningInProgress = true;
    // Trigger barcode scanner
  }
}

private void socketScanner_Event(ScannerEventArgs args) {
  // Process scanner event (Remove, Insert, Valid Data etc.)
  // Clear ScanningInProgress
  ScanningInProgress = false;
}

I hope this is of some help.
Ryan
Milsnips - 20 Mar 2007 10:03 GMT
Hey Ryan,

Thanks for the info, unfortunately the Socket SDK doesnt come free, and i'm
only building some small project which i cant afford to go out and buy the
SDK.

In regards to the OpenNetCF,.Barcode class, there is only 2 event handlers
(Disposed and OnDataRecieved) which the second only fires when there is a
successful scan read. other than that the barcode scanner just scans for a
few seconds then turns off and no event is raised.

thanks again,
Paul

> Hi Paul,
>
[quoted text clipped - 20 lines]
> I hope this is of some help.
> Ryan

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.