Requirements

Windows
.NET FrameWork 2.0 .NET FrameWork 4.0
Dynamsoft.BarcodeReader.dll Dynamsoft.BarcodeReader.dll

Three Steps to Get Started

  1. Create a new project in Visual Studio .NET.
    Right click References to add Dynamsoft.BarcodeReader.dll as per your scenario.

    Please note, the DLLs can be found in [INSTALL FOLDER]\Redist\DotNet\2.0\ or [INSTALL FOLDER]\Redist\DotNet\4.0\.

    Add namespace.
    using Dynamsoft.Barcode;
  2. Create a new button on the form and respond to its click event.

    Please update the <your image file full path> and <your license key here> with valid values respectively in the code.

    The licenses can be found in the [INSTALL FOLDER]\LicenseManager.exe.
    BarcodeReader reader = new BarcodeReader();
    reader.LicenseKeys = "<your license key here>";
    
    try
    {
        BarcodeResult[] results = reader.DecodeFile("<your image file full path>");
    
        if (results == null){
            MessageBox.Show("No barcode found.");
            return;
        }
    
        string strInfo = "Total barcode(s) found: " + results.Length.ToString() + ".\n";
        for (int i = 0; i < results.Length; ++i)
        {
            BarcodeResult barcode = results[i];
            strInfo += "Barcode " + (i+1).ToString() + ":\n";
            strInfo += barcode.BarcodeFormat.ToString() + "\n";
            strInfo += barcode.BarcodeText + "\n\n";
        }
        MessageBox.Show(strInfo);
    }
    catch (BarcodeReaderException exp)
    {
        MessageBox.Show("Error Code: " + exp.Code.ToString() + "\nError String: " + exp.Message);
    }
  3. Run the project with your test barcode images, and see how it goes for you.

    To deploy your application, please make sure the DLL is in the same folder as the EXE file.