关于打印的一些问题!多谢关注!
我写了一小段代码,进行打印!但打印驱动装不上,提示SPOOL32程序出错!
打印处的代码如下
var
Line,i: Integer;
PrintText: TextFile;
begin
//进行打印
if PrintDialog1.Execute then
begin
AssignPrn(PrintText); {assigns PrintText to the printer}
Rewrite(PrintText); {creates and opens the output file}
Try
Printer.Canvas.Font := Memo1.Font; {assigns Font settings to the canvas}
for Line := 0 to Memo1.Lines.Count - 1 do
Writeln(PrintText, Memo1.Lines[Line]); {writes the contents of the Memo1 to the printer object}
finally
CloseFile(PrintText); {Closes the printer variable}
end;
end; end;
另外:请问:在`delphi`中如何进行实数向整型的转换!我用integer进行强制类型转换没能成功!多谢!