好象有问题呀,
不管Image1里有没有图像,运行下面的后,都是说:OK,Image1里面有图像
procedure TForm1.Button1Click(Sender: TObject);
begin
if assigned(Image1.picture) then
showmessage('OK,Image1里面有图像')
else showmessage('No,Image1里面没有图像');
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
// image1.Picture.LoadFromFile('C:/temp.bmp');
if image1.Picture.bitmap.empty=true then
form1.Caption:='No,Image1 has not any picture'
else
form1.Caption:='yes,Image1 has picture';
end;