ByteScout Barcode Reader SDK - VB.NET - Decode Damaged Code 128 - ByteScout

ByteScout Barcode Reader SDK – VB.NET – Decode Damaged Code 128

  • Home
  • /
  • Articles
  • /
  • ByteScout Barcode Reader SDK – VB.NET – Decode Damaged Code 128

How to decode damaged code 128 in VB.NET and ByteScout BarCode Reader SDK

How to decode damaged code 128 in VB.NET

The sample source codes on this page shows how to decode damaged code 128 in VB.NET. ByteScout BarCode Reader SDK: the barcode decoder with support for code 39, code 128, QR Code, Datamatrix, GS1, PDF417 and all other popular barcodes. Can read barcodes from images, pdf, tiff documents and live web camera. Supports noisy and damaged documents, can split and merge pdf and tiff documents based on barcodes. Can export barcode decoder results to XML, JSON, CSV and into custom data structures. It can decode damaged code 128 in VB.NET.

This code snippet below for ByteScout BarCode Reader SDK works best when you need to quickly decode damaged code 128 in your VB.NET application. Follow the instructions from the scratch to work and copy the VB.NET code. Enjoy writing a code with ready-to-use sample VB.NET codes.

Free trial version of ByteScout BarCode Reader SDK is available for download from our website. Get it to try other source code samples for VB.NET.

Try it today: Get 60 Day Free Trial or sign up for Web API

DecodeDamagedCode128.sln
      
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27703.2026 MinimumVisualStudioVersion = 10.0.40219.1 Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DecodeDamagedCode128", "DecodeDamagedCode128.vbproj", "{C833AB57-9E98-4208-BD5D-836696183F31}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {C833AB57-9E98-4208-BD5D-836696183F31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C833AB57-9E98-4208-BD5D-836696183F31}.Debug|Any CPU.Build.0 = Debug|Any CPU {C833AB57-9E98-4208-BD5D-836696183F31}.Release|Any CPU.ActiveCfg = Release|Any CPU {C833AB57-9E98-4208-BD5D-836696183F31}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {680C7062-13C0-4713-B3EA-316308EADBE8} EndGlobalSection EndGlobal

Try it today: Get 60 Day Free Trial or sign up for Web API

DecodeDamagedCode128.vbproj
      
<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{C833AB57-9E98-4208-BD5D-836696183F31}</ProjectGuid> <OutputType>Exe</OutputType> <StartupObject>DecodeDamagedCode128.Program</StartupObject> <RootNamespace>DecodeDamagedCode128</RootNamespace> <AssemblyName>DecodeDamagedCode128</AssemblyName> <FileAlignment>512</FileAlignment> <MyType>Console</MyType> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <DefineDebug>true</DefineDebug> <DefineTrace>true</DefineTrace> <OutputPath>bin\Debug\</OutputPath> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <DefineDebug>false</DefineDebug> <DefineTrace>true</DefineTrace> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn> </PropertyGroup> <PropertyGroup> <OptionExplicit>On</OptionExplicit> </PropertyGroup> <PropertyGroup> <OptionCompare>Binary</OptionCompare> </PropertyGroup> <PropertyGroup> <OptionStrict>Off</OptionStrict> </PropertyGroup> <PropertyGroup> <OptionInfer>On</OptionInfer> </PropertyGroup> <ItemGroup> <Reference Include="Bytescout.BarCodeReader, Version=10.2.0.1799, Culture=neutral, PublicKeyToken=f7dd1bd9d40a50eb, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>c:\Program Files\Bytescout BarCode Reader SDK\net2.00\Bytescout.BarCodeReader.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> <Reference Include="System.Drawing" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Import Include="Microsoft.VisualBasic" /> <Import Include="System" /> <Import Include="System.Collections" /> <Import Include="System.Collections.Generic" /> <Import Include="System.Data" /> <Import Include="System.Diagnostics" /> </ItemGroup> <ItemGroup> <Compile Include="Program.vb" /> </ItemGroup> <ItemGroup> <Content Include="corrupted_barcode_code128.png"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> </Project>

Try it today: Get 60 Day Free Trial or sign up for Web API

Program.vb
      
Imports Bytescout.BarCodeReader Module Program Sub Main() Try ' Create and activate Bytescout.BarCodeReader.Reader instance Using reader As Reader = New Reader("demo", "demo") ' Set barcode type to find reader.BarcodeTypesToFind.Code128 = True ' ----------------------------------------------------------------------- ' NOTE: We can read barcodes from specific page to increase performance . ' For sample please refer to "Decoding barcodes from PDF by pages" program. ' ----------------------------------------------------------------------- ' Read barcodes Dim barcodes() As FoundBarcode = reader.ReadFrom("corrupted_barcode_code128.png") For Each code As FoundBarcode In barcodes Console.WriteLine("Found barcode with type '{0}' and value '{1}'", code.Type, code.Value) Next End Using Catch ex As Exception Console.WriteLine(ex.Message) End Try Console.WriteLine() Console.WriteLine("Press any key to exit...") Console.ReadLine() End Sub End Module

Try it today: Get 60 Day Free Trial or sign up for Web API

MORE INFORMATION

Get 60 Day Free Trial or Visit ByteScout BarCode Reader SDK page

Explore ByteScout BarCode Reader SDK documentation

WEB API VERSION

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next