Data Matrix FAQ in VB.NET Barcode Generator SDK

Print & insert Data Matrix and adjust Data Matrix data, image, size, and other properties with VB source code available
Barcode in VB.NET > 2D > Data Matrix FAQ
Barcode Control Library SDK for VB.NET - Data Matrix Barcode FAQ in Visual Basic.NET
VB.NET Data Matrix barcode library component DLL is a mature and powerful .NET control tool exclusively designed for generating Data Matrix and other linear & 2D barcode images in VB.NET developments using Visual Basic programming. The generated Data Matrix are displayed as high quality Gif, Tiff, Bmp, Png or Jpeg formats and streamed as Bitmap, Graphic objects. Sample code with free trial DLL is provided and source code is available with purchase version.
This page has detail information of Data Matrix property settings in VB.NET applications from the following aspects:
  • Barcode Generator Library DLL for VB.NET - Data Matrix Data Encoding
  • Barcode Generator Library DLL for VB.NET - Data Matrix Special Settings
  • Barcode Generator Library DLL for VB.NET - Data Matrix Size Adjustment
  • Barcode Generator Library DLL for VB.NET - Data Matrix Image Customization
  • Barcode Generator Library DLL for VB.NET - Data Matrix Solution Project Support
Barcode Control Library DLL for VB.NET - Data Matrix Data Encoding
2D Data Matrix Barcode Valid Data
  • Standard ASCII characters: 0-127 including A-Z, a-z, 0-9 and special characters
  • Extended ASCII characters: 128-255
Data Matrix VB.NET Sample Code:
DataMatrix.Symbol = Terrek.Barcode.BarcodeSymbol.DataMatrix
DataMatrix.BarcodeData = "DataMatrix"
Barcode Control Library SDK for VB.NET - Data Matrix Special Settings
Data Matrix Data Mode
Data Matrix has multiple data modes to encode different types of data including ASCII, C40, Text, X12, EDIFACT and Base 256 in C# class, Terrek has designed "Auto" data mode for easy and quick generation of Data Matrix barcodes. Programmers may change the Data Matrix data mode through DataMatrixDataMode property.
Data Matrix VB.NET Sample Code:
DataMatrix.DataMatrixDataMode = Terrek.Barcode.DataMatrixDataMode.Auto
Data Matrix Format Mode
Data Matrix has different format modes size from 10*10 to 144*144 and 8*18 to 16*48 respectively with even number of rows and even number of columns. Developers may change the format mode by using "DataMatrixFormatMode" property.
Data Matrix VB.NET Sample Code:
DataMatrix.FormatMode = Terrek.Barcode.DataMatrixFormatMode.Format_36X36
Data Matrix GS1 Compatible
GS1 system uses Data Matrix as a GS1 barcode because Data Matrix barcode is able to encode GS1 System data structures and offers other technical advantages. Developers may apply this function by setting FNC1 property to FNC1_1(1), which designates data formatted in accordance with the GS1 General Specifications.
Data Matrix VB.NET Sample Code:
DataMatrix.FNC1 = Terrek.Barcode.FNC1.FNC1_1
Data Matrix Tilde Function
Terrek.Barcode control component is capable of generating Data Matrix with tilde function, which is able to encode some special characters such as Returns, Tabs, RS, etc in barcode data. To apply specific special characters, programmers need to set the Tilde function to true.
Data Matrix VB.NET Sample Code:
DataMatrix.Tilde= True
Barcode Control Library DLL for VB.NET - DataMatrix Size Adjustment
DataMatrix UOM (Unit of Measure)
Set property MeasuringUnit for properties BarWidth, BarHeight, MarginL and MarginT. Valid values are PIXEL, CM and INCH. Default is PIXEL. With this UOM setting, users can control the whole barcode size to a unique type.
Data Matrix VB.NET Sample Code:
DataMatrix.MeasuringUnit = Terrek.Barcode.MeasuringUnit.PIXEL
DataMatrix Module Size
DataMatrix bar size refers to the BarWidth and BarHeight of a module bar. When developers need to create barcodes with a fixed bar width, these two properties need to be implemented. With the ImageResize applied, image width & image height are changed according to the customization of bar width and bar height. The type is float.
DataMatrix VB.NET Sample Code:
DataMatrix.BarWidth = 1
DataMatrix.BarHeight = 80
DataMatrix Image Size
DataMatrix image size refers to the whole barcode image size including image width and image height. If the module size is unknown, you can set the ImageHeight and ImageWidth directly with the applying of ImageResize to true. The generated Code 128 is 100% compatible with International Standard ISO/IEC 16022 (Second edition 2006-09-15).
DataMatrix VB.NET Sample Code:
DataMatrix.ImageWidth = 100
DataMatrix.ImageHeight = 100
DataMatrix Margin Size
Increasing the width of margins around the symbol is one way to enhance the readability of the DataMatrix barcode image. The barcode control library SDK set the left, right, top, and bottom margins separately with float values. The default value is 0.
DataMatrix VB.NET Sample Code:
DataMatrix.MarginL = 3
DataMatrix.MarginR = 3
DataMatrix.MarginT = 3
DataMatrix.MarginB = 3
Barcode Control Library DLL for VB.NET - DataMatrix Image Customization
DataMatrix Image Format
DataMatrix generated in Visual Basic.NET programs with barcode control software can be displayed as Gif, Tiff, Bmp, Png, Jpeg and other image formats. Programmers may change the format using BarcodeFormat property.
DataMatrix VB.NET Sample Code:
DataMatrix.BarcodeFormat = System.Drawing.Imaging.ImageFormat.Png
DataMatrix.SaveAsImage("C:\ DataMatrix.png")
DataMatrix Image Resolution
DPI (Dots per inch) is used commonly as the measure of printing resolution. The resolution of image generated by DataMatrix generator SDK could be managed with DPI and compatible with all printers. Type is int. Default is 96 dpi. Programmers can set resolution with DotsPerInch property.
DataMatrix VB.NET Sample Code:
DataMatrix.DotsPerInch = 126
DataMatrix Image Position
The created DataMatrix is flexible to change the placement in VB.NET projects with source. By customizing the BarAlign properly, the image is presented left, right or center in documents or projects. By changing Rotation property, the image can be rotated to 90, 180, and 270 degrees. The default is 0 degree.
DataMatrix VB.NET Sample Code:
DataMatrix.Rotation = Terrek.Barcode.Rotation.Degree180
DataMatrix.BarAlign = Terrek.Barcode.BarAlign.Left
DataMatrix Image Color
It is able to change barcode colors with barcode library software DLL using VB.NET class. Both background color and foreground color are easy to be changed by manipulating ImageColor and BarColor respectively.
DataMatrix VB.NET Sample Code:
DataMatrix.ImageColor = Color.White
DataMatrix.BarColor = Color.Black
Barcode Control Library DLL for VB.NET - DataMatrix Development Environments
With VB.NET barcode generator SDK library, programmers are easy to create Data Matrix in various VB.NET projects with free sample code and source using VB.NET programming language. Tutorial to create & print barcode images using VB.NET.
  • Windows Forms Application (design-time and runtime support)
  • Visual Basic Console Application (runtime support)
  • Visual Basic Class Library (runtime support)
  • Windows Service (runtime support)
  • ASP.NET Applications (design-time and runtime support)
  • Web Service (runtime support)
  • Crystal Report for .NET (runtime support)
  • Reporting Service Applications (design-time and runtime support)