DELPHI scrollbox控件 打印问题
我需要将scrollbox上的内容打印出来,但是只能打出目前屏幕显示部分,滚动条没有拉到的地方就打印不出来
代码如下:
Bitmap:= TBitmap.Create;
Bitmap.Width:= scrlbx1.Width;
Bitmap.Height:= scrlbx1.Height ;
scrlbx1.Paintto(Bitmap.Canvas,0,0);
Bitmap.SaveToFile('C:\111.bmp');
with Printer do
begin
begindoc;
canvas.stretchdraw(strect, Bitmap);
enddoc;
end;