ByteScout Premium Suite - VB.NET - Print barcode with barcode sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Premium Suite – VB.NET – Print barcode with barcode sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – VB.NET – Print barcode with barcode sdk

How to print barcode with barcode sdk in VB.NET using ByteScout Premium Suite

Learn to print barcode with barcode sdk in VB.NET

An easy to understand guide on how to print barcode with barcode sdk in VB.NET with this source code sample. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording and you can use it to print barcode with barcode sdk with VB.NET.

Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout Premium Suite for print barcode with barcode sdk below and use it in your application. Just copy and paste the code into your VB.NET application’s code and follow the instructions. If you want to use these VB.NET sample examples in one or many applications then they can be used easily.

ByteScout Premium Suite free trial version is available on our website. VB.NET and other programming languages are supported.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

BarcodePrinter.vb
      
Imports System Imports System.Collections.Generic Imports System.Text Imports Bytescout.BarCode Imports System.Drawing.Printing Imports System.Windows.Forms Imports System.Drawing Public Class BarcodePrinter Private m_barcode As New Barcode() Private m_widthInches As Single Private m_heightInches As Single Public Sub Print(ByVal type As SymbologyType, ByVal value As String, ByVal caption As String, ByVal widthInches As Single, ByVal heightInches As Single) m_barcode.Symbology = type m_barcode.Value = value m_barcode.Caption = caption m_widthInches = widthInches m_heightInches = heightInches Dim printDoc As New PrintDocument() AddHandler printDoc.PrintPage, New PrintPageEventHandler(AddressOf printDoc_PrintPage) Dim dlgSettings As New PrintDialog() dlgSettings.Document = printDoc If dlgSettings.ShowDialog() = DialogResult.OK Then printDoc.Print() End If End Sub Private Sub printDoc_PrintPage(ByVal sender As Object, ByVal e As PrintPageEventArgs) Dim position As New Point(100, 100) m_barcode.FitInto(New SizeF(m_widthInches, m_heightInches), GraphicsUnit.Inch) m_barcode.Draw(e.Graphics, position) End Sub End Class

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Module1.vb
      
Imports Bytescout.BarCode Module Module1 Sub Main() Dim bPrinter As New BarcodePrinter() bPrinter.Print(SymbologyType.Code39, "0123456789", "Case Number", 3.5F, 1.0F) End Sub End Module

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next