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 Set Data Matrix Size in .NET WinForms
Data Matrix Generator for Winforms is an easy- to- use barcode generating component which allows developers easy to generate and create Data Matrix barcode in Winforms applications and .NET class. It may be entirely and completely built and run in C# and VB.NET. It is designed for generate Data Matrix barcode in a short time without any special or complex configurations.
With Data Matrix Generator for Winforms, rich barcode settings are provided to manipulate barcode in image resolution, Data Matrix formats, each module size, quiet margin size surrounding Data Matrix symbols, etc. according to developers’ needs. Moreover, Data Matrix Generator for Winforms provides a complete developer guide for Data Matrix size manipulation in Winforms using Barcode Generator for Winforms; other developer guides please see:
Data Matrix Size Related Properties

Data Matrix Format Mode

With Barcode Generator for Winforms, users are allowed to create Data Matrix barcode into square pattern (10x10 to 144x144) or rectangular pattern (8x18 to 16x48 in accordance with their needs using FormatMode.

Resolution

With Barcode Generator for Winforms, users are allowed to create Data Matrix barcode into lower or higher resolution using Resolution property. However, higher resolution will lead to larger image on the same screen or printer.

Barcode Unit

With Barcode Generator for Winforms, users are allowed to measure the unit of Data Matrix bars with pixel, cm and inch using BarcodeUnit property.

Quiet Margin

With Barcode Generator for Winforms, users are allowed to easily control the size of each margin surrounding generated Data Matrix barcode using QuietMargin related property, including TopMargin, BottomMargin, RightMargin and LeftMargin.

Module Size

With Barcode Generator for Winforms, users are allowed to quickly adjust the width and height of each bar in generated barcode using ModuleSize property.

Barcode Width & Height

With Barcode Generator for Winforms, users are allowed to choose Data Matrix barcode size using BarcodeWidth and BarcodeHeight in accordance with users’ needs. Barcode width and height should more than, or at least equal to the required minimum width and height.
Customize Data Matrix Barcode Size in Winforms
Ensure have installed those programs before you set Data Matrix size in .NET Winforms:
Customize Data Matrix Barcode Size 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 FormatMode, Resolution, BarcodeUnit, BarWidth, BarHeight, BarcodeWidth, BarcodeHeight, TopMargin, BottomMargin, RightMargin, LeftMargin respectively to customize your Code 128 barcodes.
Customize Data Matrix Barcode Size in Winforms Using C#, VB.NET Class
using BusinessRefinery.Barcode;

DataMatrix Barcode = new DataMatrix();
barcode.Code = "123456789";

// Change Data Matrix barcode unit measuirement in Pixel, Inch
and Cm

barcode.BarcodeUnit = BarcodeUnit.PIXEL;

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

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

// Specify Data Matrix barcode width & height
barcode.BarcodeHeight = 100;
barcode.BarcodeWidth = 500;

// Specify the width & height of module in Data Matrix
barcode.ModuleSize= 3;

// Control Data Matrix barcode top margin, bottom margin, right margin
and left margin size

barcode.BottomMargin = 7;
barcode.TopMargin = 7;
barcode.LeftMargin = 5;
barcode.RightMargin = 5;

barcode.drawBarcode2SizeFile("c:/data-matrix-csharp.gif");
Dim barcode As BusinessRefinery.Barcode.DataMatrix = 
New BusinessRefinery.Barcode.DataMatrix()
barcode.Code = "0123456789"

// Change Data Matrix barcode unit measuirement in Pixel, Inch
and Cm

barcode.BarcodeUnit = BarcodeUnit.PIXEL

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

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

// Specify Data Matrix barcode width & height
barcode.BarcodeHeight = 100
barcode.BarcodeWidth = 500

// Specify the width & height of module in Data Matrix
barcode.ModuleSize= 3

// Control Data Matrix barcode top margin, bottom margin, right margin
and left margin size

barcode.BottomMargin = 7
barcode.TopMargin = 7
barcode.LeftMargin = 5
barcode.RightMargin = 5

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