L
lhq890
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.FormCreate(Sender: TObject);
var
a, b : TBitmap;
Rect1, Rect2 : TRect;
begin
b:=Tbitmap.Create;
b.loadfromfile('c:/010.bmp');
a :=Tbitmap.Create;
Rect1:=Bounds(0,0,width,height);
Rect2:=Bounds(left,top,width,height);
a.Canvas.CopyRect(Rect1,b.Canvas,Rect2);
image1.picture.bitmap:=a;
b.free;
a.free;
end;
结果怎么什么都没有?
var
a, b : TBitmap;
Rect1, Rect2 : TRect;
begin
b:=Tbitmap.Create;
b.loadfromfile('c:/010.bmp');
a :=Tbitmap.Create;
Rect1:=Bounds(0,0,width,height);
Rect2:=Bounds(left,top,width,height);
a.Canvas.CopyRect(Rect1,b.Canvas,Rect2);
image1.picture.bitmap:=a;
b.free;
a.free;
end;
结果怎么什么都没有?