BarCodeWiz Logo

Barcodes in C# WinForms

Step 1. Add UPCEANFonts.cs

  • Click on Project > Add Existing Item... and browse for the file UPCEANFonts.cs. The default file location is:
    Documents\BarCodeWiz Examples\UPC EAN Barcode Fonts\CSHARP\UPCEANFonts.cs


Step 2. Add the following controls to your form:

  • 1. TextBox (textBox1) - text input, will be converted to barcode
  • 3. Label (label1) - to display the encoded barcode
  • Set the Font of the label to BCW_UPCEAN_148pt

Step 3. Add the conversion code

  • Double-click on textBox1 and add the following code:
    label1.Text = BarCodeWiz.UPCEANFonts.BCW_UPCA(textBox1.Text);

Ready!

  • The final result