unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons; type TForm1 = class(TForm) Label1: TLabel; BitBtn1: TBitBtn; BitBtn2: TBitBtn; procedure BitBtn2Click(Sender: TObject); procedure BitBtn1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} function B_Set_Darkness ( darkness:integer):integer;stdcall;external 'WINPPLB.DLL'; function B_CreatePrn ( selection:integer;FileName:pchar):integer;stdcall;external 'WINPPLB.DLL'; function B_Print_Out ( copypiece:integer):integer;stdcall;external 'WINPPLB.DLL'; function B_Prn_Text ( x,y,ori,font,hor_factor,ver_factor:integer;mode:char;data:pchar):integer;stdcall;external 'WINPPLB.DLL'; function B_Prn_Barcode ( x,y,ori:integer;typee:pchar;narrow,width,height:integer;human:char;data:pchar):integer;stdcall;external 'WINPPLB.DLL'; function B_Prn_Text_TrueType ( x,y,FSize:integer;FType:pchar;Fspin,FWeight,FItalic,FUnline,FStrikeOut:integer;id_name,data:pchar):integer;stdcall;external 'WINPPLB.DLL'; function B_Get_Pcx ( x,y:integer;filename:pchar):integer;stdcall;external 'WINPPLB.DLL'; Procedure B_ClosePrn ();stdcall;external 'WINPPLB.DLL'; procedure TForm1.BitBtn2Click(Sender: TObject); begin Form1.Close; end; procedure TForm1.BitBtn1Click(Sender: TObject); begin B_CreatePrn(1, pchar('pplb.txt')); B_Set_Darkness(12); B_Get_Pcx(20, 50, pchar('phone.pcx')); B_Prn_Barcode(20, 150, 0, '1', 2, 2, 40, 'b', pchar('123456789')); B_Prn_Text(20, 220, 0, 4, 1, 1, 'n',pchar('ComScience PPLB Charlie Mei')); B_Prn_Text_TrueType(20, 270, 40, pchar('Times New Roman'), 1, 400, 0, 0, 0, pchar('AA'), pchar('Library Test')); B_Prn_Text_TrueType(20, 350, 40, pchar('Arial'), 1, 400, 0, 0, 0, pchar('AB'), pchar('Dlephi Linking Succeed')); B_Print_Out(1); B_ClosePrn; end; end.