我要在右10厘米,高10厘米处打印“你他妈的”
最好是自己编写打印程序
不要用quickrep 控件。

解决方案 »

  1.   

    提供一些资料仅供参考!
    unit main;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      RPrev, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        Memo1: TMemo;
        Button2: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM}procedure TForm1.Button1Click(Sender: TObject);
    var
      ry : TRyPrinter;
      r : TRect;
    begin
    ry := TRyPrinter.Create;
    try
    ry.NewJob;
      r.Top := Ry.YInch(1);
      r.Left := Ry.XInch(1);
      r.Right := Ry.XInch(5);
      r.Bottom := Ry.YInch(2); //doesn't really matter since
                               //the box expands on the bottom to fit text
    ry.MemoOut(r, Memo1.Lines.GetText, False, False);if Sender = Button2 then Ry.PrintIt else Ry.Preview;
    finally
    ry.Free;
    end;
    end;end.
    有问题请发信息到我的E-mail:[email protected]
      

  2.   

    《Delphi5开发人员指南》第5章有详细说明