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 Generate Data Matrix images in .NET WinForms
Data Matrix Generator for Winforms supports 20+ linear & 2D barcode generation, Data Matrix creation included, in various Visual Studio C#, VB.NET development environments, including .NET Class (C#, VB.NET), .NET Windows Forms Applications and .NET Console Applications.
Data Matrix Generator for Winforms is easy to draw Data Matrix barcodes with Design View barcode component. All generated Data Matrix barcode images can be simple generated and printed as well as in the memory into TIFF, BMP, GIF, JPEG or PNG files in Windows Forms applications. This passage gives complete samples for manipulating Data Matrix barcode image in WinForms. You may find other samples on:
Data Matrix Image Related Properties

GS1 Data Matrix

With Barcode Generator for Winforms, users are allowed to make Data Matrix barcodes that may be compatible with GS1 system using FNC1Mode property.

Data Matrix Format

With Barcode Generator for Winforms, users are allowed to select square or rectangular Data Matrix using FormatMode property.

Barcode Resolution

With Barcode Generator for Winforms, users are allowed to customize the resolution of their Data Matrix barcode images in any way they want using Resolution property.

Barcode Rotation

With Barcode Generator for Winforms, users are allowed to set Data Matrix barcode images into 0, 90, 180 and 270 degrees using Rotate property.

Image Formats

With Barcode Generator for Winforms, users are allowed to save & output generated Data Matrix barcode images into Png, Jpeg/Jpg, Gif, Tiff, Bmp, etc using ImageFormat property.

.NET Winforms Graphic Objects

With Barcode Generator for Winforms, users are allowed to save generated Data Matrix barcode images into .NET Graphics, Stream and Bitmap objectsin accordance with users' needs.
Customize Data Matrix Barcode Images in Winforms
Ensure have installed those programs before you customize Data Matrix image in .NET Winforms:
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 Resolution, Rotate, FormatMode, FNC1Mode, ImageFormat respectively to customize your Data Matrix barcodes.
Customize Data Matrix Barcode Images in Winforms Using C#, VB.NET Class
using BusinessRefinery.Barcode;

DataMatrix barcode = new DataMatrix();
barcode.Code = "0123456789";

// Change Data Matrix resolution in DPI
barcode.Resolution = 104;

// Rotate Data Matrix barcode image
barcode.Rotate = Rotate.Rotate180;

// Create GS1 compatible Data Matrix barcode
barcode.FNC1Mode = FNC1.FNC1_1ST_POS;

// Create Data Matrix barcode in square or retangular patterns
barcode.FormatMode = DataMatrixFormatMode.Format_104X104;

// Save Data Matrix in multiple image formats
barcode.Format = ImageFormat.Gif;
barcode.drawBarcode2ImageFile("c:/data-matrix-csharp.gif");

// Save Data Matrix barcode in Winforms objects
public void drawBarcode2ImageFile(string filename);
public void drawBarcode2Stream(Stream fileStream);
public byte[] drawBarcodeAsBytes();
public Bitmap drawBarcodeOnBitmap();
public void drawBarcodeOnGraphics(Graphics graphics);
Dim barcode As BusinessRefinery.Barcode.DataMatrix = 
New BusinessRefinery.Barcode.DataMatrix()

barcode.Code = "0123456789"

' Change Data Matrix resolution in DPI
barcode.Resolution = 104

' Create GS1 compatible Data Matrix barcode
barcode.FNC1Mode = FNC1.FNC1_1ST_POS

' Create Data Matrix barcode in square or retangular patterns
barcode.FormatMode = DataMatrixFormatMode.Format_104X104

' Rotate Data Matrix barcode image
barcode.Rotate = Rotate.Rotate180

' Save Data Matrix in multiple image formats
barcode.Format = ImageFormat.Gif
barcode.drawBarcode2ImageFile("c:/data-matrix-vb-net.gif")

' Save Data Matrix barcode in Winforms objects
Public Sub drawBarcode2Stream(ByVal fileStream As System.IO.Stream)
Public Sub drawBarcodeOnGraphics(ByVal graphics As
System.Drawing.Graphics)
Public Function drawBarcodeAsBytes() As Byte()
Public Function drawBarcodeOnBitmap() As System.Drawing.Bitmap