Click here to Skip to main content
Licence GPL3
First Posted 23 Jun 2004
Views 244,130
Downloads 5,212
Bookmarked 176 times

VBScan barcode software

By | 23 Jun 2004 | Article
A barcode scanning and decoding software without third-party software

Introduction

VBScan is a simple program to scan, decode and draw a barcode. It uses only .NET Framework and Windows API functions, no third party products.

It is designed to work with a "barcode wand" scanner that is connected to the com port (RS232) of a PC. Since most barcode wands have TTL voltages you'll need a converter chip to connect the wand to the PC.

After pressing the start button the program periodically checks the DSR line of the RS232. If a transition between black and white is detected it stores how many ticks the last bar was wide. After scanning and pressing stop the scanned barcode get "cleaned", so that we have no incorrect bars. If you now press decode the barcode will be decoded (only Code 3 of 9 supported at the moment) and the datastring is shown in a textbox.

Background

I wrote this program as a project in school. It was designed to work, and nothing more. I'm not a programming professional, so the code is sometimes a bit ugly.

Using the code

I have written 3 classes: Barcode, Code39 and HighSpeedTimer

The Barcode class stores the scanned data in a simple integer array. The class also provides some functions to clean and draw the barcode.

The Code39 class provides functions to decode an barcode object. It only supports "Code 3 of 9" barcodes, but it wouldn't be a problem to implement other encoding variants too.

The HighSpeedTimer class is a wrapper around the windows API functions to time more exact than the normal timer. I had to do this because the resolution of the standard timer is not high enough to scan barcodes exactly. This is probably the most ugly part in my program. If you start the timer, it uses a high amount of processor power, despite the fact that it does actually nothing... If you can help me improve this class i would appreciate it.

In the download file you'll find all the classes mentioned above and a small program (see the screenshot) to test them.

Note: In the frmMain there is a Paint event of the picturebox to redraw the barcode. It works, but uses much CPU time...

History

  • 04-06-23: v0.9.1635 - first posted version

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

About the Author

demm



Austria Austria

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionGeneration Guide for QR Code Generator in VB.NET Pinmemberblueskysinger23:15 4 Mar '12  
GeneralMy vote of 5 Pinmembermanoj kumar choubey19:27 23 Feb '12  
QuestionQR barcode generator Pinmembersteve7g16:03 12 Jan '12  
GeneralBarcode reader project PinmemberHanumanthappa.H4:36 28 Jan '11  
Generaloffline Barcode verification System(URJENT) PinmemberMember 321186320:39 30 Apr '09  
Generalhelp Pinmemberlakshmi priya.t.n17:39 29 Jan '09  
Questionhow to connect barcode machine with .net projects Pinmemberhiran5362:33 12 Jul '08  
GeneralHelp Please Urgent Pinmemberbadenmaher696:12 25 Feb '08  
QuestionBarcode help Pinmemberbadenmaher699:52 13 Feb '08  
GeneralBar Code Reader PinmemberVeera Raghavan4:21 6 Sep '07  
GeneralRe: Bar Code Reader Pinmemberblueskysinger22:38 4 Mar '12  
Generalusing barcode Pinmemberjotapz16:57 30 Jul '07  
hi!! im doing now a daily time record using barcode my problem is that i dont have any background information about barcode can i have some????????
 

 
thanks ....
GeneralGEnerating Barcode Pinmemberabhijit.dalvi291:22 4 May '07  
Questionbarcode printing Pinmembertsalim23:52 3 May '07  
AnswerRe: barcode printing Pinmembermanojhdwr@gmail.com22:42 14 Oct '11  
AnswerRe: barcode printing Pinmembermanojhdwr@gmail.com22:42 14 Oct '11  
AnswerRe: barcode printing Pinmemberblueskysinger23:13 4 Mar '12  
GeneralAutomated DTR attendance using Barcode scanner Pinmemberhardguy21:33 2 Oct '06  
GeneralRe: how to deploy the vb.net usercontrol in aspx page Pinmembermadduri_2820:14 12 Sep '06  
GeneralBarcode font Code 128 Pinmemberangelagke18:39 31 Jul '06  
Generaldata scanning through barcode scanners Pinmemberbehzad nasim2:15 31 Mar '06  
GeneralRe: data scanning through barcode scanners Pinmembermanojhdwr@gmail.com22:45 14 Oct '11  
Generalhelp me, please! Pinmember4aaaa16:13 10 Mar '06  
GeneralRe: help me, please! Pinmemberhungpvtn1:26 23 Apr '06  
QuestionNeed Help ? Pinmember| Muhammad Waqas Butt |22:11 14 Jan '06  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120529.1 | Last Updated 24 Jun 2004
Article Copyright 2004 by demm
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid