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
![](https://media.barcodewiz.com/images/e81bcc71-a819-429f-b732-2cdda9834723-code39_vbnet1.0.png)
![](https://media.barcodewiz.com/images/b9fa9e72-37b8-4329-b90a-d53f2909641d-code39_vbnet1.1.png)
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
![](https://media.barcodewiz.com/images/a088b846-ee46-404a-96a4-59ca20756260-code39_vbnet2.png)
Step 3. Add the conversion code
- Double-click on TextBox1 and add the following code:
Label1.Text = BarCodeWiz.Code39Fonts.Code39(TextBox1.Text)
![](https://media.barcodewiz.com/images/e07c516c-8293-4887-afd8-eb3b82f33f36-code39_vbnet3.png)
Ready!
- The final result
![](https://media.barcodewiz.com/images/6071bb12-bc02-44e7-9db7-cc71d494c6a6-code39_vbnet4.png)