The sample source code below will teach you how to generate pharmacode in VB.NET. ByteScout Barcode SDK: the robost library (Software Development Kit) that is designed for automatic generation of high-quality barcodes for printing, electronic documents and pdf. All popular barcode types are supported from Code 39 and Code 129 to QR Code, UPC, GS1, GS-128, Datamatrix, PDF417, Maxicode and many others. Provides support for full customization of fonts, colors, output and printing sizes. Special tools are included to verify output quality and printing quality. Can add generated barcode into new or existing documents, images and PDF. It can generate pharmacode in VB.NET.
This rich sample source code in VB.NET for ByteScout Barcode SDK includes the number of functions and options you should do calling the API to generate pharmacode. This VB.NET sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Implementing VB.NET application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.
Trial version of ByteScout Barcode SDK is available for free. Source code samples are included to help you with your VB.NET app.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
Imports System.Drawing
Imports System.Drawing.Imaging
Imports Bytescout.BarCode
Module Program
Sub Main()
Try
' Create new barcode
Using barcode As Barcode = New Barcode()
barcode.RegistrationName = "demo"
barcode.RegistrationKey = "demo"
' Set symbology
barcode.Symbology = SymbologyType.PharmaCode
' Optional margins
barcode.Margins = New Margins(5, 5, 5, 5)
' Set Value
barcode.Value = "12345"
' Set PharmaCode options:
' barcode.Options.PharmaCodeSupplementaryCode = True
' barcode.Options.PharmaCodeSupplementaryBarColor = Color.Orange
' barcode.Options.PharmaCodeMiniature = True
' barcode.Options.PharmaCodeTwoTrack = True
' Save 300 DPI Image
barcode.ResolutionX = 300
barcode.ResolutionY = 300
barcode.SaveImage("300dpi.png", ImageFormat.Png)
' Save 600 DPI Image
barcode.ResolutionX = 600
barcode.ResolutionY = 600
barcode.SaveImage("600dpi.png", ImageFormat.Png)
End Using
' Show image in default image viewer
Process.Start("300dpi.png")
Process.Start("600dpi.png")
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
Console.WriteLine("Press enter key to exit...")
Console.ReadLine()
End Sub
End Module
60 Day Free Trial or Visit ByteScout Barcode SDK Home Page
Explore ByteScout Barcode SDK Documentation
Explore Samples
Sign Up for ByteScout Barcode SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Barcode SDK Home Page
Explore ByteScout Barcode SDK Documentation
Explore Samples
Sign Up for ByteScout Barcode SDK Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: