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.
Display a barcode on the screen
Display a barcode on the screen
Best Regards
Osman
Osman
Re: Display a barcode on the screen
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.
(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.)
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.

(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."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Display a barcode on the screen
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"
and you must have the FONT installed
@ 12,25 DCSAY "*123456*" FONT "MV6Code39M"
Nolberto Paulino
Regards
Regards
Re: Display a barcode on the screen
Tom, Nolberto Thank you for your solutions.
For now, "*12345*" will do the trick.
For now, "*12345*" will do the trick.
Best Regards
Osman
Osman
Re: Display a barcode on the screen
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."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."