BarCodeWiz Logo

Barcodes in VB.NET WinForms

Step 1. Add Code39Fonts.vb

  • Click on Project > Add Existing Item... and browse for the file Code39Fonts.vb. The default file location is:
    Documents\BarCodeWiz Examples\Code 39 Barcode Fonts\VBNET\Code39Fonts.vb


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_148pt

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