保存:
procedure TForm1.Button2Click(Sender: TObject);
var
aBitMap:TBitmap;
MyRect: TRect;
begin
MyRect := Rect(0,0,PaintBox1.Width,PaintBox1.Height);
aBitmap := TBitMap.Create;
aBitmap.Height := PaintBox1.Height;
aBitmap.Width := PaintBox1.Width;
aBitmap.Canvas.CopyRect(MyRect,PaintBox1.Canvas,MyRect);
aBitmap.SaveToFile('e:/temp.bmp');
aBitmap.Free;
end;