[SOLVED] About Barcode.pas lazarus / 62-General ---------------------------------------------------------------------- Kevinn33 · 2018-04-03 13:55 hello, i am new to pascal and lazarus, i wonder why i cant view the barcode that was generated, the source is from here(pict) Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, FileUtil, LR_BarC, Forms, Controls, Graphics, Dialogs,  StdCtrls,barcode, LR_Class, LR_View; type   { TForm1 }   TForm1 = class(TForm)    Button1: TButton;    frBarCodeObject123: TfrBarCodeObject;    frPreview1: TfrPreview;    Label1: TLabel;    procedure Button1Click(Sender: TObject);  private   public   end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject);begin   frBarCodeObject123:= TfrBarCodeObject.Create(self);   label1.Caption:= '123';end; end. ---------------------------------------------------------------------- balazsszekely · 2018-04-03 15:14 Did you try: ($LazarusDir)/components/lazreport/samples/barcode/ ? ---------------------------------------------------------------------- Kevinn33 · 2018-04-03 16:03 @GetMem, Tried but i dont want to use its report i just want to show the barcode, then the next step will be print it. well i got it fixed Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1; {$mode objfpc}{$H+} interface uses  Classes, SysUtils, FileUtil, LR_BarC, Forms, Controls, Graphics, Dialogs,  StdCtrls, ExtCtrls,barcode, LR_Class, LR_View; type   { TForm1 }   TForm1 = class(TForm)    Button1: TButton;    frBarCodeObject123: TfrBarCodeObject;    frPreview1: TfrPreview;    Label1: TLabel;    PaintBox1: TPaintBox;    procedure Button1Click(Sender: TObject);  private   public   end; var  Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject);var  Barcode : TBarcode;begin     Self.Caption:='123123';     Barcode := TBarcode.Create(Text);     Text:='12345';     Label1.Caption:='berhasil';     Barcode.Height:= 20;      Barcode.DrawBarcode(PaintBox1.Canvas);  end; end.  But i still cant change the barcode number.. it shows 000000000, and i dont understand what is -> self ---------------------------------------------------------------------- Bart · 2018-04-03 16:29 Quote from: Kevinn33 on April 03, 2018, 06:03:07 pm... and i dont understand what is -> self From that I read: I really have no clue about the language I use now... Bart ---------------------------------------------------------------------- balazsszekely · 2018-04-03 16:54 If you don't want to use reports try this: http://wiki.freepascal.org/LazBarcodes ---------------------------------------------------------------------- Kevinn33 · 2018-04-03 17:12 @Bart  yeah .-. i'm new to this, i've just learn from afew piece of program.. maybe if you could help with where i can study from first? tried lazbarcodes, but it appears only show QR codes, no source telling that i can do 1D codes, saw this post ending, looks convincing but dont understand most of it ---------------------------------------------------------------------- balazsszekely · 2018-04-03 17:59 @Kevinn33 I'm out of ideas.... 1. Please take a look at this example(package lazbarcodes): http://for um.lazarus.freepascal.org/index.php/topic,29997.msg190460.html#msg1904 60 2. If lazbarcodes is not what are you looking for, there is one more package you can try, but first you must uninstall lazbarcode to prevent duplicated unit error: https://packages.lazarus- ide.org/Barcodes.zip (see attached image) ---------------------------------------------------------------------- Kevinn33 · 2018-04-03 22:44 I would like to say many thanks @GetMem  thats exactly what I wanted, Simple and easy to use I wonder why I cant search it anywhere for that ---------------------------------------------------------------------- RasDev · 2021-12-26 14:31 Quote from: GetMem on April 03, 2018, 07:59:54 pm@Kevinn33 I'm out of ideas.... 1. Please take a look at this example(package lazbarcodes): http://for um.lazarus.freepascal.org/index.php/topic,29997.msg190460.html#msg1904 60 2. If lazbarcodes is not what are you looking for, there is one more package you can try, but first you must uninstall lazbarcode to prevent duplicated unit error: https://packages.lazarus- ide.org/Barcodes.zip (see attached image) is https://packages.lazarus-ide.org/Barcodes.zip not available anymore? ---------------------------------------------------------------------- alaa123456789 · 2021-12-26 16:26 you could use the fonts , for example check the following website https://www.fontspace.com/category/bar-code hope it is useful thanks ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-12-26 23:38 Hey GetMem, Quote from: GetMem on April 03, 2018, 07:59:54 pm2. If lazbarcodes is not what are you looking for, there is one more package you can try, but first you must uninstall lazbarcode to prevent duplicated unit error: https://packages.lazarus-ide.org/Barcodes.zip (see attached image) While I was doing my QR Code tests I came upon the fact that LazBarcodes does not have 1D code. The thing is, in my past, I was able to play around with 1D codes AND the QR Code components. I quite vividly remember this. And now that you posted this link: https://packages.lazarus- ide.org/Barcodes.zip(Which is a 404 incidently), it clicked... The package that I used to install with all the 1D and 2D components was called Barcodes and not LazBarcodes. So, now I ask, dear friend GetMem, when did one get dropped and the other came about? And are we sure they are incompatible? If so, I want to have access to the OLD one, Barcodes, not the new one which is missing half of what they advertise Maybe you can shed some light on this matter. Cheers, Gus ---------------------------------------------------------------------- balazsszekely · 2021-12-27 06:21 Hi Gus, Quotenow I ask, dear friend GetMem, when did one get dropped and the other came about?Unfortunately I cannot recall any details. Personally I never used any of those packages. ---------------------------------------------------------------------- af0815 · 2021-12-27 07:51 I used the wayback machine and did not find Barcodes.zip only LazBarcodes.zip . Misterious https://web.archive.org/web/20170527221914/http://packages.lazarus- ide.org/ ---------------------------------------------------------------------- Jurassic Pork · 2021-12-28 08:13 hello, Quote from: af0815 on December 27, 2021, 08:51:11 amI used the wayback machine and did not find Barcodes.zip only LazBarcodes.zip . Misterious https://web.archive.org/web/20170527221914/http://packages.lazarus- ide.org/ it seems that the components are in the systools package   -> try to install systools in OPM . In attachment barcode of a Code128 type with systools. Friendly, J.P ---------------------------------------------------------------------- Jurassic Pork · 2021-12-31 07:18 hello, ultimately i have found the history of the Barcodes package : it came from the package pl_barcodes of CodeTyphon and has been deleted from Lazarus because it used a part of systools and lazBarcodes code. But the problem is that in lazBarcodes there isn't 1D barcodes and systools seems to have problem to be compiled with lazarus 64 bits. I have recreated the package (in attachment) from pl_barcodes package of CodeTyphon 7.5.1 with ct2Laz converter. Seems to be OK on windows 10 Lazarus 2.0.12 64 bits and Ubuntu 20.04 Lazarus 2.1.0. If you use this package, don't use systools and lazBarcodes packages. Friendly, J.P ---------------------------------------------------------------------- wp · 2021-12-31 09:52 Quote from: Jurassic Pork on December 31, 2021, 08:18:16 amsystools seems to have problem to be compiled with lazarus 64 bits There's lots of asm code in systools files. Given that these routines were written in the last decade/millenium it should be possible to replace them by standard Pascal code nowadays without much performance loss. Is there anybody out there who could do this? ---------------------------------------------------------------------- Jurassic Pork · 2021-12-31 14:29 wp have a look to this package  github.com/TurboPack/SysTools QuoteTurboPack SysTools Provided FPC3.2.0 port, and Lazarus 2.0.10 package Updated for 10.3 Rio / VER330 / PKG 260 You can still access 10.2 Tokyo and 10.1 Berlin versions too.i have some troubles to compile the packages with my lazarus version but it seems that the asm code in the source code files is gone. Friendly, J.P ---------------------------------------------------------------------- wp · 2021-12-31 15:48 Ah, good catch. I am able to compile it after adding a dummy boolean property "Enhanced" to TMyMetaFile: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i type  { TMetafile }   TMetafile = class(TGraphic)  private    ...    FEnhanced: Boolean;    ...  public    ...    property Enhanced: Boolean read FEnhanced write FEnhanced;  // dummy, not implemented  end; And after installing the designtime package (SysToolsDD) which is possible only after checking the "Register unit" box for unit StReg, and attempting to click a barcode component onto the form, the IDE hangs. Another problem is that the units are Windows-only, i.e. all the changes in LazSysTools must be backported to this version. So, what is easier: debug this package and make it cross-platform, or remove the ASM parts in the LazSystools package? ---------------------------------------------------------------------- Jurassic Pork · 2021-12-31 16:24 Quote from: wp on December 31, 2021, 04:48:12 pmSo, what is easier: debug this package and make it cross-platform, or remove the ASM parts in the LazSystools package? are there many people using this package ? i don't believe. Search systools in the forum. there are only few results. If it is for the 1D Barcode generator have a look in the pl_barcodes package using the barcode part of systools. May be create  a lazbarcodes1D package with that or merge it with lazbarcodes. ---------------------------------------------------------------------- wp · 2021-12-31 16:36 Quote from: Jurassic Pork on December 31, 2021, 05:24:54 pmQuote from: wp on December 31, 2021, 04:48:12 pmSo, what is easier: debug this package and make it cross-platform, or remove the ASM parts in the LazSystools package? are there many people using this package ? i don't believe. If it is for the 1D Barcode generator have a look in the pl_barcodes package using the barcode part of systools. May be create  a lazbarcodes1D package with that. Thanks. Make sure to rename the SysTools barcode components so that there is no naming conflict for those few people using SysTools as well. ---------------------------------------------------------------------- Jurassic Pork · 2022-01-01 08:27 hello and happy new year, here is a new package (lazStBarcodes) with the systools barcodes from the pilot logic package pl_barcodes. All the units have been renamed to avoid conflict with other lazarus packages. It contains 1D barcodes and MaxiCode, PDF417 2D barcodes. You can use it complementary to lazbarcodes 2D and there is no problem to use it in the same time than systools package. It can be used on linux, macOs and windows on 32 or 64 bits system. Tested on : Windows 10 Lazarus 2.0.12 64 bits Ubuntu 20.04 Lazarus 2.1.0 MacOs Catalina 10.15 Lazarus 2.0.10 In attachment the package and screenshots of the components. friendly, J.P ---------------------------------------------------------------------- wp · 2022-03-10 09:39 Added a lot a 1D barcodes to the LazBarcodes package on CCR (https://sourceforge.net/p/lazarus- ccr/svn/HEAD/tree/components/lazbarcodes/). See also https://wiki.lazarus.freepascal.org/LazBarcodes (the wiki is not fully updated, yet).