不要用什么CopyRect了,试试下面的程序。
procedure TForm1.Button1Click(Sender: TObject);
var
rgn :HRgn;
bmp,bmp0 :TBitmap;
begin
bmp :=TBitmap.Create;
bmp.Assign(Image1.Picture.Bitmap);
Image1.Picture.Assign(nil);
rgn :=CreateRectRgn(40,40,250,150);
SelectClipRgn(bmp.Canvas.Handle,rgn);
bmp0 :=TBitmap.Create;
bmp0.Width :=250-40;
bmp0.Height :=150-40;
BitBlt(bmp0.Canvas.Handle,0,0,210,110,bmp.Canvas.Handle,40,40,SRCCOPY);
Image1.Picture.Bitmap.Assign(bmp0);
bmp.Free;
bmp0.Free;
end;