图形控件(100分)

  • 主题发起人 主题发起人 wgd2000
  • 开始时间 开始时间
W

wgd2000

Unregistered / Unconfirmed
GUEST, unregistred user!
请问有没有一张图片镶嵌到另一图片中去的控件
 
请大家帮助我!!
 
使用两个picturebox
 
从TIMAGE继承下来一个TDblImage
TDblImage=class(TImage)
protected
procedure Loaded; override;
public
constructor Create(AOwner:TComponent); overried;
destructor Destroy; override;
procedure BuildDblImage;
published
OrgImage : TPicture;
AddImage : TPicture;
HMargin : Integer;
VMargin : Integer;

constructor Create(AOwner : TComponent);
begin
inherited;
OrgImage := TPicture.Create;
AddImage := TPicture.Create;
end;

destructor Destroy;
begin
OrgImage.Free;
AddImage.Free;
inherited;
end;

procedure Loaded;
begin
inherited;
BuildDblImage;
end;

procedure BuildDblImage;
var Bitmap : TBitmap;
begin
Bitmap := TBitmap.Create;
Bitmap.Assign(OrgImage);
Bitmap.Canvas.Draw(HMargin, VMargin, AddImage.Graphic);
Picture.Assign(Bitmap);
Bitmap.Free;
end;

网吧没有DELPHI,我写个大概,你在自己调一下
 
写起来也麻烦,就照crystal大师吧!
 
接受答案了.
 
后退
顶部