The sample shows instructions and algorithm of how to draw barcode to form hdc with barcode sdk and how to make it run in your Visual Basic 6 application. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can draw barcode to form hdc with barcode sdk in Visual Basic 6.
The following code snippet for ByteScout Premium Suite works best when you need to quickly draw barcode to form hdc with barcode sdk in your Visual Basic 6 application. Follow the instructions from scratch to work and copy the Visual Basic 6 code. Further improvement of the code will make it more robust.
Trial version of ByteScout Premium Suite is available for free. Source code samples are included to help you with your Visual Basic 6 app.
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 Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite 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 Premium Suite Home Page
Explore ByteScout Premium Suite Documentation
Explore Samples
Sign Up for ByteScout Premium Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: