当前位置:首页>开发>正文

delphi中如何定义TBitmap类型的变量? delphi的Tbitmap对象没有left属性怎么办

2023-05-15 10:30:04 互联网 未知 开发

 delphi中如何定义TBitmap类型的变量? delphi的Tbitmap对象没有left属性怎么办

delphi中如何定义TBitmap类型的变量?

delphi中如何定义TBitmap类型的变量?
p: TBitmap

bmp := TBitmap.Create
try
...
finally
bmp.Free
end

1.85.13.*  <span class="tm">5-14 15:15</span>
</p>
<div class="b bt2"><div class="bt bg1 ft"><img alt="其他答案" height="16" src="/static/img/ico2.gif" width="16"/>其他答案</div></div>
<p class="ft bb">在上面引用jpeg
var bmp: TBitmap
bmp := TBitmap.Create
这样就创建了

顺一门有百福 平安二字值千金 万象更新

delphi的Tbitmap对象没有left属性怎么办?

朋友,我来告诉你答案!控件才有lefttop之类的属性~~~对象只有widthheight这种东西,要不你就把tbitmap加载到image,然后再去设置image的left或者top

delphi 紧急求救!!

bmp:=TBitmap.Createbmp.Width Form1.ClientWidthbmp.Height Form1.Heightbmp.Canvas.CopyRect(Form1.ClientRect,Form1.Canvas,Form1.ClientRect)bmp.Canvas.Polyline(...)0A...Form1.Canvas.Draw(0,0,bmp)bmp.Free更好的方法是在Form1创建时就创建bmp(这时bmp应为Form1的成员),并用Form1的背景色填充,每次向Form1上画时都先向bmp上画,这样就不用bmp.Canvas.CopyRect(Form1.ClientRect,Form1.Canvas,Form1.ClientRect)这句了。

最新文章