请教关于多个IMAGE loadfromfile的问题(100分)

  • 主题发起人 主题发起人 vclsaga
  • 开始时间 开始时间
V

vclsaga

Unregistered / Unconfirmed
GUEST, unregistred user!
我在处理多个image文件加载图形时有个问题,请问如何用个简单的方法将一图形加载到多个image中,我用(sender as image).picture.loadfromfile(filename)报错,
报错信息:invalid class typecase
请高手帮帮忙!!在线等!!!
 
for i := 0 to ComponentCount -1 do
begin
if Components is Timage then
begin
(Components as Timage).Picture.LoadFromFile('C:/Documents and Settings/Administrator/My Documents/My Pictures/123.bmp');
end;
end;
 
谢谢!!!给分!!
 
后退
顶部