Getting started with Visual Basic 6 and Bytescout.BarCode Reader SDK for .NET 2.00 or higher

The following sample demonstrates how to read barcode from photo image (BarcodePhoto.jpg file) in Visual Basic 6 using Bytescout BarCode Reader SDK for .NET

Sample input image for barcode recognition:
barcode vb 6


<span style="color: rgb(128, 0, 0); font-weight: bold;">Private</span> <span style="color: rgb(128, 0, 0); font-weight: bold;">Sub</span> Form_Load<span style="color: rgb(128, 128, 48);">(</span><span style="color: rgb(128, 128, 48);">)</span>
 
  <span style="color: rgb(105, 105, 105);">' IMPORTANT NOTE: you need to have .NET Framework 1.10 installed to use BarCode SDK from Visual Basic</span>
 <span style="color: rgb(105, 105, 105);">' to download and install .NET Framework 1.10 please use this link:
 <a href="http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3</span>
 
<span" title="http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3</span>
 
<span">http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4...</a> style="color: rgb(128, 0, 0); font-weight: bold;">Set</span> bc <span style="color: rgb(128, 128, 48);">=</span> <span style="color: rgb(128, 0, 0); font-weight: bold;">CreateObject</span><span style="color: rgb(128, 128, 48);">(</span><span style="color: rgb(0, 0, 230);">"Bytescout.BarCodeReader.Reader"</span><span style="color: rgb(128, 128, 48);">)</span>
 
bc<span style="color: rgb(0, 140, 0);">.</span>ReadFromFile <span style="color: rgb(0, 0, 230);">"BarcodePhoto.jpg"</span>
 
 
<span style="color: rgb(128, 0, 0); font-weight: bold;">For</span> i <span style="color: rgb(128, 128, 48);">=</span> <span style="color: rgb(0, 140, 0);">0</span> <span style="color: rgb(128, 0, 0); font-weight: bold;">To</span> bc<span style="color: rgb(0, 140, 0);">.</span>FoundCount <span style="color: rgb(128, 128, 48);">-</span> <span style="color: rgb(0, 140, 0);">1</span>
 
     <span style="color: rgb(128, 0, 0); font-weight: bold;">Msgbox</span> <span style="color: rgb(0, 0, 230);">"Found barcode on page #"</span> <span style="color: rgb(128, 128, 48);">&</span> <span style="color: rgb(128, 0, 0); font-weight: bold;">CStr</span><span style="color: rgb(128, 128, 48);">(</span>bc<span style="color: rgb(0, 140, 0);">.</span>GetFoundBarcodePage<span style="color: rgb(128, 128, 48);">(</span>i<span style="color: rgb(128, 128, 48);">)</span><span style="color: rgb(128, 128, 48);">)</span> <span style="color: rgb(128, 128, 48);">&</span> <span style="color: rgb(0, 0, 230);">" with type"</span>
 
     <span style="color: rgb(128, 128, 48);">&</span> <span style="color: rgb(128, 0, 0); font-weight: bold;">Cstr</span><span style="color: rgb(128, 128, 48);">(</span>bc<span style="color: rgb(0, 140, 0);">.</span>GetFoundBarcodeType<span style="color: rgb(128, 128, 48);">(</span>i<span style="color: rgb(128, 128, 48);">)</span><span style="color: rgb(128, 128, 48);">)</span> <span style="color: rgb(128, 128, 48);">&</span> <span style="color: rgb(0, 0, 230);">" and value "</span> <span style="color: rgb(128, 128, 48);">&</span> bc<span style="color: rgb(0, 140, 0);">.</span>GetFoundBarcodeValue<span style="color: rgb(128, 128, 48);">(</span>i<span style="color: rgb(128, 128, 48);">)</span>
 
<span style="color: rgb(128, 0, 0); font-weight: bold;">Next</span>
 
<span style="color: rgb(128, 0, 0); font-weight: bold;">Set</span> bc <span style="color: rgb(128, 128, 48);">=</span> <span style="color: rgb(128, 0, 0); font-weight: bold;">Nothing</span>
 
 
<span style="color: rgb(128, 0, 0); font-weight: bold;">End</span> <span style="color: rgb(128, 0, 0); font-weight: bold;">Sub</span>
Filed in: BarCode Reader SDK