Dear All ,

I am working on a project which will read a 1d barcode by a barcode scanner and once barcode is scanned this barcode will turn to product description and picture of the scanned product on the screen.

The aim is to show product details ( use, ingredients , picture ) once barcode is scanned.

How such project can be realised.

Thanks in advance.

Eddy Garcia

Dani AI

Generated

Practical approach for : the scanner usually delivers a short string (the barcode payload). The app should capture that string, use it as a lookup key in your product catalog (local database, file-based index, or third‑party UPC/EAN service), then fill UI controls with product text and a JPEG. This builds on ’s catalog idea and answers ’s point — knowing the barcode/symbology helps when choosing/configuring the scanner.

A simple, robust capture pattern in VB.NET WinForms is to let the scanner act like a keyboard (most do) and read the code when the scanner sends its suffix (typically Enter). Keep a small, focused TextBox for scanner input and handle the Enter key to call your lookup routine:

Private Sub txtScanner_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtScanner.KeyPress
    If e.KeyChar = Microsoft.VisualBasic.ChrW(13) Then ' scanner sends Enter
        Dim code = txtScanner.Text.Trim()
        txtScanner.Clear()
        LoadProduct(code)
    End If
End Sub

Image/storage guidance: store product metadata in a normalized table and keep images on disk (store relative paths) if you expect many/large pictures — this keeps the DB lean and makes thumbnail generation and caching easier. If you prefer blobs, stream them in/out and generate thumbnails at insert time. Always use parameterized queries and Using blocks for connections to avoid leaks and SQL injection.

Troubleshooting tips: test the scanner in Notepad to see exact output (prefix/suffix, length). Ensure the TextBox has focus or use Raw Input/HID APIs for multiple devices. For SerialPort scanners, update the UI via Invoke from DataReceived. Add a “not found” flow, index the barcode column for fast lookups, and debounce input if you need to distinguish typed input from fast scanner input. If you don’t have a product catalog, consider reputable UPC/EAN lookup services as a starting point.

Recommended Answers

All 2 Replies

Post a picture of one of the barcodes you are using.

You must have saved those information somewhere in your database. And then only you can display them after reading the barcode.

Most of the Barcode reader actually read the bar code and product its alphanumeric value.
So make a table like

id   Barcode   ProductName  Description  Image
-----------------------------------------------------
1    ABCD12    XYZ Product  Computer     [Binary]
..   .....     .....        ......       ....

And then when a barcode is read just search the database for that barcode and you will get your result - display it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.