The samples of source code documentation give a quick and simple method to apply a required functionality into your application. Fit into given size with barcode sdk in VB.NET can be applied with ByteScout Barcode Suite. ByteScout Barcode Suite is the bundle that privides 3 SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK).
Save time on writing and testing code by using the code below and use it in your application. Just copy and paste this VB.NET sample code to your VB.NET application’s code editor, add a reference to ByteScout Barcode Suite (if you haven’t added yet) and you are ready to go! Further improvement of the code will make it more robust.
Trial version can be downloaded from our website for free. It contains this and other source code samples for VB.NET.
Imports System.Diagnostics Imports Bytescout.BarCode Class Program Friend Shared Sub Main(args As String()) ' Create new barcode Dim barcode As New Barcode() ' Set symbology barcode.Symbology = SymbologyType.Code39 ' Set value barcode.Value = "Sample" ' Specify barcode size by bounds to fit into. ' You can use any measure units. barcode.FitInto(5, 3, UnitOfMeasure.Inch) ' Save barcode to image barcode.SaveImage("result.png") ' Show image in default image viewer Process.Start("result.png") End Sub End Class