There is a ticket with data (number, etc.), how, and most importantly, how can I create a bar code for this ticket in Delphi?
- stackoverflow.com/questions/5008544/β¦ - teran
- 21. Determine the Stich algorithm ( ru.wikipedia.org/wiki/β¦ ). 2. Find implementation in the network (Google). - nick_n_a
- Saw somewhere in the xls network file with a vb-script that generates a lot of standards of the stich. - nick_n_a
- @nick_n_a fits Code 128. But to find the implementation, until it comes out, looked through a bunch of components - ArtGrek13
- one@ ArtGrek13 TfrxBarCodeView I used, I need to drop this component on the form and specify the value in the properties (double click in the editor), a form will pop up asking the type of bar code, orientation, text value. In the "Code" field - the variable with the value you need to specify - Albert Fomin
|
1 answer
Made on Delphi XE8 Fast Report 5.0
uses ... frxBarcode, // Π΄Π»Ρ TfrxBarCodeView frxBarcod; // Π΄Π»Ρ ΠΏΡΠΈΡΠ²ΠΎΠ΅Π½ΠΈΡ BarType Π½ΡΠΆΠ½ΠΎΠ³ΠΎ ΡΠΈΠΏΠ° ΡΡΡΠΈΡ
-ΠΊΠΎΠ΄Π° function TForm1.CreateBarcode(): TMemoryStream; var BarStream: TMemoryStream; BarImage: TImage; BarCode: TfrxBarCodeView; begin BarStream := TMemoryStream.Create; try BarImage := TImage.Create(nil); try BarCode := TfrxBarCodeView.Create(nil); try BarCode.BarType := bcCode128; BarCode.Text := 'some barcode text'; BarCode.ShowText := False; BarCode.Height := 89; // ΠΏΡΠΎΡΠΈΡΠΎΠ²ΡΠ²Π°Π΅ΠΌ ΡΡΡΠΈΡ
-ΠΊΠΎΠ΄ Π½Π° ΠΊΠ°Π½Π²Ρ ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ Ρ // ΠΌΠ°ΡΡΡΠ°Π±Π₯ 1, ΠΌΠ°ΡΡΠ°Π±Π£ 1, ΡΠΌΠ΅ΡΠ΅Π½ΠΈΠ΅Π₯ 0, ΡΠΌΠ΅ΡΠ΅Π½ΠΈΠ΅Π£ 0 BarCode.Draw(BarImage.Canvas,1,1,0,0); BarImage.Picture.Bitmap.SaveToStream(BarStream); finally FreeAndNil(BarCode); end; finally FreeAndNil(BarImage); end; finally Result := BarStream; end; end; |