RSS Archive Contact Us Advertise

IT Management Begins With Security
SecurityProNews > Articles > Application Development > Simple Barcoding In C#
Search:
[ articles_application_development ]

Simple Barcoding In C#



James Divine
Contributing Writer
2003-09-19

SecurityProNews RSS Feed SecurityProNews RSS Feed


This article provides a simple way to produce Code 3 of 9 Barcodes through C#. While there are many third-party controls that offer this functionality, it is just as simple to integrate your barcodes using readily available barcode TrueType fonts.

The source code included in the zip file contains two classes, one is the UI to retrieve the barcode info (frmBarcode.cs), and the other is the barcode printing class (BarcodePrinter.cs). Also, for this example to work, you will need to add the TrueType Font for the barcode that is included in the source code.

I chose the 3 of 9 Barcode style (also known as a Code 39) for this example for two reasons, it is not fixed with, and it allows for both Alpha and Numeric characters. With the font included here, an asterisk (*) is used as both the start and the stop character for the barcode symbology. Without the (*) on both ends, the barcode will not scan.

For my example, I have set the barcode font size to 15 point. You are free to adjust is as needed for your application, but keep in mind that a small barcode may not be readable by all scanners and some wedge type scanners cannot read extremely wide barcodes. You will need to determine the proper size for your application.





Please note that I have set the #if DEBUG directive so that the application will only print to the PrintPreview Dialog during testing. Doing this saves greatly in both time and printer costs.

The human readable element of the barcode here is optional.



Source Code - SimpleBarcoding.zip



About the Author:
James Divine is currenlty involved in a large scale SAP re- implementation for Wausau Homes (http://www.wausauhomes.com). The company has chosen the .Net platform for building a UI for the mobile sales force. .Net will be used to create a fully dynamic UI that will be driven by the SAP's Variant using reflection and Xml. The interface will be delivered with User Controls embedded in HTML pages (allowing WinForms capability in IE).

More articles_application_development Articles

SecurityProNews RSS Feed SecurityProNews RSS Feed


Get Your Site Submitted for Free in the World's Largest B2B Directory!

Email Address:
* URL:
*
*Indicates Mandatory Field

Terms & Conditions

iEntry Featured Services: Jayde Member Services | Forums | Freeware | Advertise with Us

Virus Warnings

Subscribe to
SecurityProNews FREE!



[ more newsletters ]

article resources
Search Articles:
[advanced search]

WebProWorld.com
Get in-touch with industry experts and leaders
Post your site for review by expert and peers
Ask Security, IT, Development and Design questions

Free Membership: Join Now!

Visit WebProWorld.com

Titan Quest Forum
The #1 Titan Quest forum
Halo 3 Forum
The best Halo, Halo 2, Halo 3 forum
Nintendo Wii
Nintendo Wii news and views
Mac Software
The best in OS X freeware
Graphics Forum
Your source for graphic tutorials
SecurityProNews.com | Breaking eBusiness News Get Your IT Questions Answered - Click Here SecurityProNews News Feeds