Displaying a barcode on a form

To display a barcode on a form a TextBox is used to hold the characters and the Font property of the TextBox set to a suitable size of the relevant font (eg. AZTW or PD3W).

 

For example:

 

Private Sub DoBarcode()             Visual Basic

      Abcnet1.Caption="123456789

      TextBox1.Texte=Aztnet1.Barcode()

End Sub

 

private void DoBarcode()                  C#

{

      aztnet1.Caption="123456789";

      textBox1.Text=aztnet1.Barcode();

}

 

private void DoBarcode()

{

      aztnet1.set_Caption("123456789");

      textBox1.set_Text(aztnet1.Barcode());

}

 

More:

Printing a barcode