给你两个例子
procedure TForm1.Button1Click(Sender: TObject);
var
Bitmap : TBitMap;
begin
Bitmap := TBitmap.Create;
try
with Bitmap do begin
LoadFromFile('c:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp');
Transparent := True;
TransParentColor := BitMap.canvas.pixels[50,50];
Form1.Canvas.Draw(0,0,BitMap);
TransparentMode := tmAuto; // Transparent color now is clDefault = TColor($20000000);
Form1.Canvas.Draw(50,50,BitMap);
end;
finally
Bitmap.Free;
end;
end;
或者
procedure TForm1.Button1Click(Sender: TObject);
var
Bitmap : TBitMap;
begin
Bitmap := TBitmap.Create;
try
with Bitmap do begin
LoadFromFile('c:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp');
Transparent := True;
TransParentColor := BitMap.canvas.pixels[50,50];
Form1.Canvas.Draw(0,0,BitMap);
TransparentMode := tmAuto; // Transparent color now is clDefault = TColor($20000000);
Form1.Canvas.Draw(50,50,BitMap);
end;
finally
Bitmap.Free;
end;
end;有问题应该多看看帮助,那里有很多例子。
procedure TForm1.Button1Click(Sender: TObject);
var
Bitmap : TBitMap;
begin
Bitmap := TBitmap.Create;
try
with Bitmap do begin
LoadFromFile('c:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp');
Transparent := True;
TransParentColor := BitMap.canvas.pixels[50,50];
Form1.Canvas.Draw(0,0,BitMap);
TransparentMode := tmAuto; // Transparent color now is clDefault = TColor($20000000);
Form1.Canvas.Draw(50,50,BitMap);
end;
finally
Bitmap.Free;
end;
end;
或者
procedure TForm1.Button1Click(Sender: TObject);
var
Bitmap : TBitMap;
begin
Bitmap := TBitmap.Create;
try
with Bitmap do begin
LoadFromFile('c:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp');
Transparent := True;
TransParentColor := BitMap.canvas.pixels[50,50];
Form1.Canvas.Draw(0,0,BitMap);
TransparentMode := tmAuto; // Transparent color now is clDefault = TColor($20000000);
Form1.Canvas.Draw(50,50,BitMap);
end;
finally
Bitmap.Free;
end;
end;有问题应该多看看帮助,那里有很多例子。
解决方案 »
- (结贴率100%)看到一篇文章,强制卸载DLL,可惜是C++代码,求帮忙翻译成Delphi的
- delphi内嵌网页
- 请问Delphi多行注释时 用什么符号 谢谢!!
- 刷新怎么做啊?
- 在局域网中没有主机,是对等网通过交换机通讯,网关设置在路由上,怎样做web服务器!
- 求一条sql语句,高手帮帮忙!!!!!!!!!!
- 请高手指点.......................................................
- 怎样用ado 备份和恢复access数据库
- 急,明天就要交程序了,请问怎么才能知道产生的异常的名称,并拦截?
- 关于String类型的问题?(不够就加分)
- 三层中服务器端得到的一个记录集合怎么传递到客户端
- 两个用delphi做的系统有冲突,怎么办??
真的特急!!!!
急寻帮助!!!!!!!!!!!!
先谢了!!!