遗
遗失的密码
Unregistered / Unconfirmed
GUEST, unregistred user!
打印机是Datamax I 4208,并口方式。我写了:
运行后WriteCount = 54,但条码打印机没有任何反应。
代码:
var prtString0: string;
FileHandle: integer;
WriteCount: integer;
begin
prtString0 := '';
prtString0 := '<STX>L<CR>121100001000100TEST PRINT:<STX>TBCD GHI PQ, TU<CR>E<CR>';
FileHandle := FileOpen('LPT1', fmOpenWrite);
if FileHandle > 0 then
begin
WriteCount := FileWrite(FileHandle, prtString0, Length(prtString0));
Showmessage('写入字节数 = ' + IntToStr(WriteCount));
end else
begin
Showmessage('打开并口错误');
end;
FileClose(FileHandle);
end;