Software Search, Categories and Specials
Ozgrid, Experts in Microsoft Excel Spreadsheets
Javascript DHTML Drop Down Menu Powered by dhtml-menu-builder.com

Active DataXL - Download

 

AnalyserXL - Download

 

DownloaderXL - Download

 

Smart VBA - Download

 

TraderXL - Download

C# Application For Printing Barcode Fonts

 

Microsoft Excel - From Beginner to Expert in 6 Hours/ EXCEL DASHBOARD REPORTS

Using the ID-Automation .cs class file within a C# application for printing barcode fonts

All purchases can be made via Id-Automations site

LICENSE NOTICE: You may incorporate this source code in your application only if you own a valid license from ID Automation Inc. for the associated font and the copyright notices are not removed from the source code. Redistribution of our fonts and components requires a Developer License.

The ID-Automation.cs class file encapsulates the data encoding and printing of bar codes into one object.  This class should be used as a template for your C# bar coding needs.  The class encodes data into the appropriate symbology format and sends the bar coded string to the default printer for the computer.  It is important that you have the appropriate ID-Automation.com fonts installed on your computer before attempting to call the print method of the class.

Steps to including and using the ID-Automation.cs file in your application.

Before you Start coding:

Download the ID-Automation.com bar code C# class file and save the file to your local hard drive.  Please note where the file was saved to, you will need to find it later.

Create or open the Visual Studio .NET project in which you would like to include the class.

In order to use the printing features of the ID-Automation.com class you must ensure that you include a reference to the System.Drawing namespace in your C# solution.  To include the System.Drawing namespace:

  • Click Project | Add Reference from the VS.NET IDE menu
  • On the .NET tab, locate and select the component name System.Drawing.dll
  • Click the Select button
  • Click the Ok button

Add the ID-Automation.cs file to your project.

  • Click Project | Add Existing Item from the VS.NET IDE menu
  • Navigate to the location where you saved the downloaded ID-Automation.com class file
  • Select ID-Automation.cs from the list and click Open

Using the ID-Automation.com class file in your VS.NET solution:

Include the ID-Automation.com namespace in your solution.  Each namespace in your solution must be aware of the bar code namespace provided in the ID-Automation.com class file.

using CSharpExample;

Once you have added the reference to the ID-Automation.com namespace to your C# solution, you are ready to instantiate and use the bar code object.  To create the object you should add the following code to your solution, where VariableName is the name that you choose for your instance of this bar code object.

clsBarCode VariableName = new clsBarCode();

At this point you may begin to use the methods associated with your bar code object.  The class includes methods that take in a string as an input value.  The methods will add the appropriate Start and stop characters of the selected symbology, add the checksum character (if required by the symbology), and encode the data to the format of the symbology.  The class also includes a print method that will take the encoded data, font type, and font size as input values and print the barcode to the default printer for the computer.  The table below gives a more detailed outline of each method.

Method Name Method Description
Code128( ) If you are not sure which Code 128 set is for your application, then use this one. This is a "Code 128 Auto" function that will automatically encode any data from ASCII 0 to ASCII 127. It will automatically switch to character set C for numbers also.
To encode alpha-numeric UCC/EAN-128, ASCII 202 or character � is entered as the FNC1 before each AI. For example, the UCC number of (8100)712345(21)12WH5678 should be entered as: 81007123452112WH5678.
Code128a( ) Use the characters from set B to print characters not on the keyboard; the scanner will scan characters from set A.
Code128b( ) Returns codes formatted to the Code 128 character set B. Formats output to the Code 128 barcode fonts.
Code128c( ) This code128 function "interleaves" numbers into pairs for high density.
Code128HR( ) Returns the human readable version of the data used in the Code128( ) method.
Interleaved2of5( ) This function "interleaves" numbers into pairs for high density without check digits and formats the return string to the Interleaved 2 of 5 font.
Interleaved2of5Mod10( ) Performs the mod10 checksum calculation for increased accuracy and formats the return string to the Interleaved 2 of 5 font. MOD 10 checksums are required by USPS for special services and for SSC-14 when using Interleaved 2 of 5 for that purpose.
Code39( ) Formats the output to print using Code 39 fonts.
Code39mod43( ) Performs the mod43 checksum calculation for increased accuracy and then formats the output to print using Code 39 fonts. The mod43 checksum is usually required for LOGMARS and HIBC applications.
Codabar( ) Formats the output to print using Codabar fonts.
EAN13( ) Enter EAN-13 with or without a check digit, add-ons are supported. If a check digit is passed in it is ignored, recalculated, and added to the encoded output.  Formats output to the UPC/EAN barcode font.
EAN8( ) Enter exactly 7 characters (EAN-8 without the check digit). Formats output to the UPC/EAN barcode font.
MSI( ) Formats data to the MSI font standard
POSTNet( ) Enter a single string of Zip, Zip + 4 or Zip + 4 + Delivery Point. The input for this method must be a number and can include dashes and spaces.
PrintBarCode( ) Takes the encoded data, the name of the font, and the font size as input parameters then sends the barcode to the default printer.
UPCA( ) Enter UPC-A with or without a check digit, add-ons are supported. Formats output to the UPC/EAN barcode font.

After you have finished using the barcode object that you have created, destroy the object by using the following code where VariableName is the name of your object:

VariableName = null;

All purchases can be made via Id-Automations site

Special ! Free Choice of Complete Excel Training Course or Excel Add-ins Collection on all purchases totaling over $70.00. ALL purchases totaling over $150.00 gets you BOTH! Send payment proof to [email protected] 31 days after purchase date.  

See Also: Barcodes - Fonts, ActiveX, labels and DLL's Index. Barcode MICR CMC-7 || Codabar Barcode Font || Code 11 Barcode Font || Code 128 Barcode Font || Code 25 Barcode Font || Code 39 Barcode Font || Code 93 Barcode Font || Code39 Full ASCII Barcode Font || Data Matrix Encoder || Interleaved 25 Barcode Font || MICR E13B Font || MSI Barcode Font || OCR Font || PDF417 Encoder || Telepen Barcode Font || UPC EAN Barcode Font



Instant Download and Money Back Guarantee on Most Software

Microsoft Excel - From Beginner to Expert in 6 Hours/ EXCEL DASHBOARD REPORTS

Excel Trader Package Technical Analysis in Excel With $139.00 of FREE software!

Microsoft � and Microsoft Excel � are registered trademarks of Microsoft Corporation. OzGrid is in no way associated with Microsoft

GIVE YOURSELF OR YOUR COMPANY 24/7 MICROSOFT EXCEL SUPPORT & QUESTIONS