The code below will help you to implement an Visual Basic 6 app to draw barcode to form HDC. ByteScout Barcode SDK is the fully featured library to generate barcodes. Supports QR Code, Code 39, Code 128, UPC, GS1, GS-128, PDF417, Datamatrix and many other barcode types. Includes various options for barcode generation to ensure output quality, add barcodes to new or existing pdf files and images. It can be used to draw barcode to form HDC using Visual Basic 6.
This code snippet below for ByteScout Barcode SDK works best when you need to quickly draw barcode to form HDC in your Visual Basic 6 application. This Visual Basic 6 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! Test Visual Basic 6 sample code examples whether they respond your needs and requirements for the project.
ByteScout Barcode SDK free trial version is available on our website. Visual Basic 6 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)
VERSION 5.00 Begin VB.Form Form1 AutoRedraw = -1 'True Caption = "Form1" ClientHeight = 4845 ClientLeft = 45 ClientTop = 435 ClientWidth = 9795 LinkTopic = "Form1" ScaleHeight = 4845 ScaleWidth = 9795 StartUpPosition = 3 'Windows Default End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Form_Load() ' IMPORTANT NOTE for this sample: click on Form1 in the Design mode and set "AutoRedraw" property to True to make all drawings visible Set bc = CreateObject("Bytescout.BarCode.Barcode") ' set symbology type bc.Symbology = 1 ' 1 = Code39 ' set value to encode bc.Value = "012345" ' draw code 39 barcode to the form at (0,0) bc.DrawHDC hDC, 0, 0 ' now drawing 2D Aztec barcode ' set symbology type bc.Symbology = 17 ' 17 = Aztec ' set value to encode bc.Value = "012345" ' draw 2D Aztec barcode to the form at (0,200) bc.DrawHDC hDC, 0, 200 Set bc = Nothing End Sub
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
Type=Exe Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINXP\system32\stdole2.tlb#OLE Automation Form=Form1.frm Startup="Form1" ExeName32="Project1.exe" Command32="" Name="Project1" HelpContextID="0" CompatibleMode="0" MajorVer=1 MinorVer=0 RevisionVer=0 AutoIncrementVer=0 ServerSupportFiles=0 VersionCompanyName="000" CompilationType=0 OptimizationType=0 FavorPentiumPro(tm)=0 CodeViewDebugInfo=0 NoAliasing=0 BoundsCheck=0 OverflowCheck=0 FlPointCheck=0 FDIVCheck=0 UnroundedFP=0 StartMode=0 Unattended=0 Retained=0 ThreadPerObject=0 MaxNumberOfThreads=1 [MS Transaction Server] AutoRefresh=1
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: