Create Code 39 Barcodes in C# Windows Forms

Step 1. Add Code39Fonts.cs

  • Click on Project > Add Existing Item... and browse for the file Code39Fonts.cs. The default file location is:
    Documents\BarCodeWiz Examples\Code 39 Barcode Fonts\CSHARP\Code39Fonts.cs
Add a reference to the project

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_Code39h_1, 48pt

Step 3. Add the conversion code

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

Ready!

  • The final result
UPC A Font in a label with C#