BizCode Barcode Generator for Winforms
The most robust & powerful barcode component for Microsoft .NET Windows Forms
Quick Overviews
  • Professional barcode control
  • Flexible controls provided
  • Support WinForms projects
  • Linear & 2D barcodes support
  • Winforms Data-binding support
How to Encode Data Matrix Data in .NET WinForms
BusinessRefinery.com Winforms Barcode Data Matrix Generator is a powerful Winforms barcode generation class library. It enables developers and other users to create Data Matrix barcodes in Winforms applications.
Winforms Barcode Data Matrix Generator supports Data Matrix barcode in ISO - ISO / IEC 16022 (2nd edition 2006-09-15), and also compatible with GS1 system standard. This product requires minimum Data Matrix and provides a set of Data Matrix generation guide for you; please see:
Data Matrix Data Related Properties

Data Mode

With Barcode Generator for Winforms, users are allowed to set create Data Matrix with different data modes using DataMode property.

8 Data Matrix data modes:
  • Auto: this component will determine the best data mode for you
  • ASCII: encodes standard ASCII characters 0-127
  • C40: mainly encodes upper-case alphabetic, numeric and other characters to be encoded by the use of shift characters in conjunction withthe data character
  • Text: encodes encode normal printed text
  • X12: encodes the standard ANSI X12 electronic data interchange characters
  • Edifact: encodes 63 ASCII values (values from 32 to 94) plus an Unlatch character (binary 011111) to return to ASCII encodation
  • Base256: encodes any 8-bit byte data, including extended channel interpretations and binary data
  • Customer: encodes data according to the customer

Code

With Barcode Generator for Winforms, users are allowed to control Data Matrix barcode data length using Code property.

ProcessTilde

With Barcode Generator for Winforms, users are allowed to encode some special characters for Data Matrix barcode using a tilde characters "~" using ProcessTilde property.
  • 1-byte character: ~0dd/~1dd/~2dd (character value from 000 ~ 255); ASCII character '~' is presented by ~126
    Strings from "~256" to "~299" are unused
  • 2-byte character (Unicode): ~6ddddd (character value from 00000 ~ 65535)
    Strings from "~665536" to "~699999" are unused
  • for GS1 AI Code:
  • ECI: ~7dddddd (valid value of dddddd from 000000 to 999999)
  • ~rp: Reader Programming (for ASCII mode and Auto mode only)
    This should be located at the beginning of the encoding data, e.g. data = "~rpABCD1234"
  • ~m5: 05 Macro (for ASCII mode and Auto mode only)
    This should be located at the beginning of the encoding data, e.g. data = "~m5ABCD1234"
  • ~m6: 06 Macro (for ASCII mode and Auto mode only)
    This should be located at the beginning of the encoding data, e.g. data = "~m6ABCD1234"
Encode Data Matrix Barcode Data in Winforms
Ensure have installed those programs before you encrypt Data Matrix valid data in .NET Winforms:
  • Microsoft .NET Framework 2.0/3.0/4.0
  • Microsoft Visual Studio 2005/2008/2010 (Express, Professional & Standard Edition)
  • Barcode Generator for Winforms installed
Customize Data Matrix Barcode Images in Windows Forms Using BarcodeControl
  1. Add .NET Winforms Barcode Control onto your .NET Visual Studio Toolbox;
  2. Drag and drop the WinDataMatrix control into the Forms;
  3. You will see a barcode image generated;
  4. Right click you mouse to activate barcode setting panel;
  5. Select DataMode, Code, ProcessTilde respectively to customize your Data Matrix barcodes.
Encode Data Matrix Barcode Data in Winforms Using C#, VB.NET Class
using BusinessRefinery.Barcode;
DataMatrix barcode = new DataMatrix();

// Select different data mode for Data Matrix data encoding
Barcode.DataMode = DataMatrixDataMode.ASCII;

// Modify Data Matrix data length
barcode.Code = "0123456789";
barcode.drawBarcode2ImageFile("c:/data-matrix-csharp.gif");
Dim barcode As BusinessRefinery.Barcode.DataMatrix = 
New BusinessRefinery.Barcode.DataMatrix()

' Encode Data Matrix with "~"
barcode.ProcessTilde = true
barcode.Code = "~45823";

barcode.drawBarcode2ImageFile("c:/data-matrix-vb-net.gif");