Windows Forms Control
Use BarcodeControl to add a barcode to a Windows Form and configure it in the
Visual Studio designer. The control is included in TECIT.TBarCode.dll for
.NET Framework applications. To create barcodes entirely in code instead, see
Barcode Class.
Create the Project and Add the Control
- Create a C# Windows Forms App (.NET Framework) project in Visual Studio.
- Open the form in the Windows Forms Designer and select View > Toolbox.
- Right-click the Toolbox and select Choose Items.
- On the .NET Framework Components tab, select
BarcodeControl. If the control is not listed, select Browse and openTECIT.TBarCode.dllfrom the appropriate installation directory. - If the list contains more than one control named
BarcodeControl, select the control in theTECIT.TBarCode.Windowsnamespace. - Drag
BarcodeControlfrom the Toolbox onto the form.
Configure the Barcode
Select the control on the form and open the Properties window. Expand the
Barcode property. Common properties include:
Data: Content to encode.BarcodeType: Barcode type to generate.CheckdigitMethod: Check digit calculation, if required.SizeModeandModuleWidth: Barcode sizing and, withCustomModuleWidth, an optional fixed module width.IsTextVisible: Shows or hides the human-readable text.Rotation: Rotates the barcode.
Resize and position the control directly in the designer. You can also access
these settings in code through the control's Barcode property:
barcodeControl1.Barcode.BarcodeType = BarcodeType.DataMatrix;
barcodeControl1.Barcode.Data = "Sample barcode data";
Run the Application
Select Start Debugging. The form displays the barcode with the settings from the designer or your code. Without a valid license, the output can include a demo marker.
API Reference
For all control and barcode properties, see the
TBarCode .NET Developer Reference.
The Windows Forms control is documented in the TECIT.TBarCode.Windows
namespace.