小弟初学delphi  使用 comport4.1 组件 现在通过 com口连接 打印机 
打印程序 如下
procedure TForm1.Button1Click(Sender: TObject);
begin
  comport1.Open;
  comport1.WriteStr('1234567890');
    comport1.WriteStr('1234567890');
      comport1.WriteStr('1234567890');
        comport1.WriteStr('1234567890');
          comport1.WriteStr('·1234567890');
end;
终端打印机型号为epson m-150ii
打印出来的东西我想设置行间距点请问如何设置呢 ?
还有这个组件好不好  如果换用什么组件更好?我使用别的软件 打印出来的 0 是中间有个点  但是我这个打印出来的中间有个斜线  请问这个如何设置呢 
希望大家帮帮忙  谢谢了

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, CPort, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        ComPort1: TComPort;
        Button2: TButton;
        procedure Button2Click(Sender: TObject);
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button2Click(Sender: TObject);
    begin
      Comport1.ShowSetupDialog;
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
      comport1.Open;
      comport1.WriteStr('1234567890');
        comport1.WriteStr('1234567890');
          comport1.WriteStr('1234567890');
            comport1.WriteStr('1234567890');
              comport1.WriteStr('·1234567890');
    end;end.
      

  2.   


    这个我知道  据说是  esc 2 是设置行间距
    可是这个咋设置  用什么命令  能有个详细点的例子吗  麻烦了
      

  3.   

    这个我知道  据说是  esc 2 是设置行间距
    可是这个咋设置  用什么命令  能有个详细点的例子吗  麻烦了
      

  4.   

    补充个提问  我是使用 comport控件好一些 还是使用 spcomm控件好呢?
    请各位高手帮忙  感激不尽
      

  5.   

    comport1.WriteStr(#$1b'2');
    这个是ESC 2命令发向打印机的例子,手册上对每个命令对应的十六进制代码都有说明的,找个手册下载下来一看就知道了。