There is a ticket with data (number, etc.), how, and most importantly, how can I create a bar code for this ticket in Delphi?

  • 2
    1. 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 1

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;