//Ersin Kecis. 22/05/2003. ersinkecis@hotmail.com
procedure TForm1.Image1DblClick(Sender: TObject);
var ADevice,ADriver,APort:PChar;
ADeviceMode:THandle;
PrinterVar:Boolean;
Rect:TRect;
begin
Rect.Top:=0;
Rect.Left:=0;
Rect.Right:=Image1.Picture.Graphic.Width;
Rect.Bottom:=Image1.Picture.Graphic.Height;
PrinterVar:=True;
try
Printer.GetPrinter(ADevice,ADriver,APort,ADeviceMode);
except
PrinterVar:=False;
end;
if PrinterVar then
begin
Printer.BeginDoc;
try
Printer.Canvas.StretchDraw(Rect,Image1.Picture.Graphic);
Printer.EndDoc;
except
Printer.Abort;
raise;
end;
end else showmessage('Default printer tanimli degil!');
end;