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

  1. Create a C# Windows Forms App (.NET Framework) project in Visual Studio.
  2. Open the form in the Windows Forms Designer and select View > Toolbox.
  3. Right-click the Toolbox and select Choose Items.
  4. On the .NET Framework Components tab, select BarcodeControl. If the control is not listed, select Browse and open TECIT.TBarCode.dll from the appropriate installation directory.
  5. If the list contains more than one control named BarcodeControl, select the control in the TECIT.TBarCode.Windows namespace.
  6. Drag BarcodeControl from 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.
  • SizeMode and ModuleWidth: Barcode sizing and, with CustomModuleWidth, 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.

Search documentation

Search in
More scopes
Additional scopes

All contents