L
linmang
Unregistered / Unconfirmed
GUEST, unregistred user!
我的程序如下:
var
device:array [0..cchdevicename-1] of char;
driver:array [0..(max_path-1)] of char;
port:array [0..32] of char;
hdmode:thandle;
pdmodedevmode;
i ,j:integer;
begin
printer.getprinter(device,driver,port,hdmode);
if hdmode <> 0 then
pdmode:=globallock(hdmode);
if pdmode <> nil then
begin
pdmode^.dmpaperlength:= 64;
pdmode^.dmpaperwidth:=185;//按实际MM设置纸
pDMode^.dmPaperSize:=DMPAPER_USER;
//pDMode^.dmFields:=pDMode^.dmFields or DM_PAPERSIZE;
GlobalUnLock(hDMode);
printer.setprinter(device,driver,port,hdmode);
end;
Printer.begin
Doc;
Printer.Canvas.Font.Charset := GB2312_CHARSET;
Printer.Canvas.Font.Size :=14;
i := strtoint(edit1.Text);
j := strtoint(edit2.Text);
//在这里显示printer.pageheight 和pagewidth 还是387 和1098 怎么回事?
Printer.Canvas.TextOut(25,100,'testtttttttttttttttttttttthhhhhhhhhhhhh';
//具体走几页纸跟这个25和100和后面字符串都有关,又看不出规律来,着急
Printer.EndDoc;
end;
哪位指教一下,这样的打印机怎么控制啊,是usb接口的,boca systems.
var
device:array [0..cchdevicename-1] of char;
driver:array [0..(max_path-1)] of char;
port:array [0..32] of char;
hdmode:thandle;
pdmodedevmode;
i ,j:integer;
begin
printer.getprinter(device,driver,port,hdmode);
if hdmode <> 0 then
pdmode:=globallock(hdmode);
if pdmode <> nil then
begin
pdmode^.dmpaperlength:= 64;
pdmode^.dmpaperwidth:=185;//按实际MM设置纸
pDMode^.dmPaperSize:=DMPAPER_USER;
//pDMode^.dmFields:=pDMode^.dmFields or DM_PAPERSIZE;
GlobalUnLock(hDMode);
printer.setprinter(device,driver,port,hdmode);
end;
Printer.begin
Doc;
Printer.Canvas.Font.Charset := GB2312_CHARSET;
Printer.Canvas.Font.Size :=14;
i := strtoint(edit1.Text);
j := strtoint(edit2.Text);
//在这里显示printer.pageheight 和pagewidth 还是387 和1098 怎么回事?
Printer.Canvas.TextOut(25,100,'testtttttttttttttttttttttthhhhhhhhhhhhh';
//具体走几页纸跟这个25和100和后面字符串都有关,又看不出规律来,着急
Printer.EndDoc;
end;
哪位指教一下,这样的打印机怎么控制啊,是usb接口的,boca systems.