Click here to Skip to main content
Click here to Skip to main content

VBScan barcode software

, 23 Jun 2004
Rate this:
Please Sign up or sign in to vote.
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
No Biography provided

Comments and Discussions

 
QuestionMessage Automatically Removed Pinmemberblueskysinger4-Mar-12 23:15 
GeneralMy vote of 5 Pinmembermanoj kumar choubey23-Feb-12 19:27 
QuestionQR barcode generator Pinmembersteve7g12-Jan-12 16:03 
GeneralBarcode reader project PinmemberHanumanthappa.H28-Jan-11 4:36 
Generaloffline Barcode verification System(URJENT) PinmemberMember 321186330-Apr-09 20:39 
Generalhelp Pinmemberlakshmi priya.t.n29-Jan-09 17:39 
Questionhow to connect barcode machine with .net projects Pinmemberhiran53612-Jul-08 2:33 
GeneralHelp Please Urgent Pinmemberbadenmaher6925-Feb-08 6:12 
QuestionBarcode help Pinmemberbadenmaher6913-Feb-08 9:52 
GeneralBar Code Reader PinmemberVeera Raghavan6-Sep-07 4:21 
GeneralMessage Automatically Removed Pinmemberblueskysinger4-Mar-12 22:38 
Generalusing barcode Pinmemberjotapz30-Jul-07 16:57 
GeneralGEnerating Barcode Pinmemberabhijit.dalvi294-May-07 1:22 
Questionbarcode printing Pinmembertsalim3-May-07 23:52 
AnswerRe: barcode printing Pinmembermanojhdwr@gmail.com14-Oct-11 22:42 
AnswerRe: barcode printing Pinmembermanojhdwr@gmail.com14-Oct-11 22:42 
AnswerMessage Automatically Removed Pinmemberblueskysinger4-Mar-12 23:13 
GeneralAutomated DTR attendance using Barcode scanner Pinmemberhardguy2-Oct-06 21:33 
GeneralRe: how to deploy the vb.net usercontrol in aspx page Pinmembermadduri_2812-Sep-06 20:14 
GeneralBarcode font Code 128 Pinmemberangelagke31-Jul-06 18:39 
Generaldata scanning through barcode scanners Pinmemberbehzad nasim31-Mar-06 2:15 
GeneralRe: data scanning through barcode scanners Pinmembermanojhdwr@gmail.com14-Oct-11 22:45 
Generalhelp me, please! Pinmember4aaaa10-Mar-06 16:13 
GeneralRe: help me, please! Pinmemberhungpvtn23-Apr-06 1:26 
QuestionNeed Help ? Pinmember| Muhammad Waqas Butt |14-Jan-06 22:11 

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.

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 24 Jun 2004
Article Copyright 2004 by demm
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid