📄 barkodetiket.pas
字号:
unit barkodetiket;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Db, dxmdaset, QuickRpt, ExtCtrls, StdCtrls, Buttons, DBarImage, Qrctrls,
DBarQrp;
type
Tbarkode = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
ComboBox1: TComboBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
ComboBox2: TComboBox;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
QuickRep1: TQuickRep;
QRBand1: TQRBand;
bart: TdxMemData;
DataSource1: TDataSource;
QRDuckBarcode1: TQRDuckBarcode;
bartbkod1: TStringField;
bartbkod2: TStringField;
bartbkod3: TStringField;
bartbkod4: TStringField;
QRDuckBarcode2: TQRDuckBarcode;
QRDuckBarcode3: TQRDuckBarcode;
QRDuckBarcode4: TQRDuckBarcode;
bartkod: TIntegerField;
procedure BitBtn2Click(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
procedure Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Edit2KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Edit3KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Edit4KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
barkode: Tbarkode;
implementation
{$R *.DFM}
procedure Tbarkode.BitBtn2Click(Sender: TObject);
Var
sira,sayi:Integer;
begin
bart.close;
bart.open;
sayi:=1; sira:=0;
// if ComboBox1.Text='EVET' Then
// QRDuckBarcode1.Options:= QRDuckBarcode1.Options + [boCheckCRC];
for sira:=1 to 12 do
begin
bart.edit;
bartkod.Value:=sayi;
bartbkod1.Text:=Edit1.text;
bartbkod2.Text:=Edit2.text;
bartbkod3.Text:=Edit3.text;
bartbkod4.Text:=Edit4.text;
bart.post;
bart.append;
sayi:=sayi + 1;
end;
quickrep1.Preview;
end;
procedure Tbarkode.ComboBox2Change(Sender: TObject);
begin
{ if ComBobox2.Text='bsEAN13' then
QRDuckBarcode1.Style:=bsEAN13;
if ComBobox2.Text='bsEAN8' then
QRDuckBarcode1.Style:=bsEAN8;
if ComBobox2.Text='bsUPCA' then
QRDuckBarcode1.Style:=bsUPCA;
if ComBobox2.Text='bsUPCE' then
QRDuckBarcode1.Style:=bsUPCE;
}
end;
procedure Tbarkode.Edit1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = 13 then
edit2.setfocus;
end;
procedure Tbarkode.Edit2KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = 13 then
edit3.setfocus;
end;
procedure Tbarkode.Edit3KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = 13 then
edit4.setfocus;
end;
procedure Tbarkode.Edit4KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = 13 then
bitbtn1.SetFocus;
end;
procedure Tbarkode.BitBtn1Click(Sender: TObject);
begin
close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -