unit1.~pa

来自「调用TSC动态链接库的Delphi源码。 此代码为网络收集」· ~PA 代码 · 共 50 行

~PA
50
字号
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure openport(PrinterName:pchar);stdcall;far; external 'e:\other\dll-try\tsclib.dll';
procedure closeport; external 'e:\other\dll-try\tsclib.dll';
procedure sendcommand(Command:pchar);stdcall;far;external 'e:\other\dll-try\tsclib.dll';
procedure setup(LabelWidth, LabelHeight, Speed, Density, Sensor, Vertical, Offset:pchar);stdcall; far; external 'e:\other\dll-try\tsclib.dll';
procedure downloadpcx(Filename,ImageName:pchar);stdcall;far;external 'e:\other\dll-try\tsclib.dll';
procedure barcode(X, Y, CodeType, Height, Readable, Rotation, Narrow, Wide, Code :pchar); stdcall; far; external 'e:\other\dll-try\tsclib.dll';
procedure printerfont(X, Y, FontName, Rotation, Xmul, Ymul, Content:pchar);stdcall;far; external 'e:\other\dll-try\tsclib.dll';
procedure clearbuffer; external 'e:\other\dll-try\tsclib.dll';
procedure printlabel(NumberOfSet, NumberOfCopoy:pchar);stdcall; far;external 'e:\other\dll-try\tsclib.dll';
procedure formfeed;external 'e:\other\dll-try\tsclib.dll';
procedure nobackfeed; external 'e:\other\dll-try\tsclib.dll';
procedure windowsfont (X, Y, FontHeight, Rotation, FontStyle, FontUnderline : integer; FaceName, TextContect:pchar);stdcall;far;external 'e:\other\dll-try\tsclib.dll';

procedure TForm1.Button1Click(Sender: TObject);
var
  i: Integer;

begin

openport('TSC Clever TTP-342M');
        for i:=1 to 2 do
         begin
          clearbuffer;
          sendcommand('DIRECTION 1');
          windowsfont(5, 115, 30, 0, 2, 0, '穝灿

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?