for i:= self.ComponentCount -1 downto 0 do if (Pos('dl',Components[i].Name)<>0) and (COmponents[i].ClassName='TImage') then begin (Components[i] as TImage).Picture.SaveToFile((COmponents[i] as TImage).Name+'.bmp') end;
For iCount := 父控件.ControlCount-1 DownTo 0 Do Begin If 父控件.Controls[iCount].ClassName = 'TIamge' Then 父控件.Controls[iCount].Free; End;记住只能从高往低哦!
myimage.Left:=x; {创建位置}
myimage.Top:=y;
myimage.Width:=image9.width;
myimage.height:=image9.Height;
inc(counter8);
myimage.picture:=image9.picture;
myimage.Name:='dl'+inttostr(counter8); {记录一个组件}
myimage.parent:=self;如何删除动态生成的图片(N个)
如何保存动态生成的图片(N个)
如何释放动态生成的图片(N个)
if (Pos('dl',Components[i].Name)<>0) then
COmponents[i].Free;
if (Pos('dl',Components[i].Name)<>0) and (COmponents[i].ClassName='TImage') then
begin
(Components[i] as TImage).Picture.SaveToFile((COmponents[i] as TImage).Name+'.bmp')
end;
Begin
If 父控件.Controls[iCount].ClassName = 'TIamge' Then
父控件.Controls[iCount].Free;
End;记住只能从高往低哦!
在FORM1中放入了一个窗体,窗体上面是IMAGE1,动态图标在此窗体的IMAGE1上产生,删除按纽在FORM1上,点击按钮事件却无任何效果。是何原因?