Display a barcode on the screen

This forum is for eXpress++ general support.
Post Reply
Message
Author
OSMAN
Posts: 2
Joined: Sat Jan 30, 2010 1:31 pm
Location: İstanbul, Türkiye

Display a barcode on the screen

#1 Post by OSMAN »

Hello friends, good work to all.
Is there a way to display a barcode on the screen?
@12,25 DCSAY "123456" FONT "MV6Code39M" or another method.
Thanks in advance.
Best Regards
Osman

User avatar
Tom
Posts: 1293
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Display a barcode on the screen

#2 Post by Tom »

There are at least three ways to do this:

1. Use a barcode font. Barcode fonts are available for some simple barcodes like "Code 39". There are no barcode fonts for more complex barcodes or 2D-barcodes like DataMatrix or QR.
2. Create an image using a tool like "zint" (open source) and load the image into a XbpBitmap object. (https://zint.org.uk/)
3. Do the same as in 2., but with an ActiveX component like "TBarCode".

We use the List&Label report generator in our applications, which comes with all barcodes, simply generated with one function call in a form. In order to show this on the screen, we use the storage system of L&L and export the form with the barcode in it to JPG or PDF - and show this in our app.

You may even find functions to create barcodes by yourself and show them using the GRA engine. But this will be a little work. 8-)
(Edit: You may ask ChatGPT to help you to generate Xbase++-code which shows simple barcodes like Code 39 or Code 128 or some others using Xbase++'s GRA engine. Just ask for it.)
Last edited by Tom on Fri Jul 25, 2025 7:53 am, edited 1 time in total.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
digitsoft
Posts: 469
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: Display a barcode on the screen

#3 Post by digitsoft »

You have to put a * at the beginning and another at the end *
and you must have the FONT installed

@ 12,25 DCSAY "*123456*" FONT "MV6Code39M"
Nolberto Paulino
Regards

OSMAN
Posts: 2
Joined: Sat Jan 30, 2010 1:31 pm
Location: İstanbul, Türkiye

Re: Display a barcode on the screen

#4 Post by OSMAN »

Tom, Nolberto Thank you for your solutions.
For now, "*12345*" will do the trick.
Best Regards
Osman

User avatar
Tom
Posts: 1293
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Display a barcode on the screen

#5 Post by Tom »

BTW, Xbase++ 2.0 contains an asset to create, draw and print 2D-barcodes like QR and DataMatrix.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply