W
wyf_aaa
Unregistered / Unconfirmed
GUEST, unregistred user!
在Form1中加入Imag1,printDialog1和Button1。
加入下面代码为什么图片打印不出来?在Form1中可以显示图片
procedure TForm1.Button1Click(Sender: TObject);
begin
Image1.Picture.LoadFromFile('bar.bmp');
if PrintDialog1.Execute then
begin
with Printerdo
begin
begin
Doc;
Canvas.Draw(300,200,Image1.Picture.Graphic);
EndDoc;
end;
end;
加入下面代码为什么图片打印不出来?在Form1中可以显示图片
procedure TForm1.Button1Click(Sender: TObject);
begin
Image1.Picture.LoadFromFile('bar.bmp');
if PrintDialog1.Execute then
begin
with Printerdo
begin
begin
Doc;
Canvas.Draw(300,200,Image1.Picture.Graphic);
EndDoc;
end;
end;