首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

img1.Picture.Graphic.Empty 是个bug?一用就内存异常

2012-04-07 
img1.Picture.Graphic.Empty是个bug?一用就内存错误img1.Picture.Graphic.Empty一运行就内存错误,请问还有

img1.Picture.Graphic.Empty 是个bug?一用就内存错误
img1.Picture.Graphic.Empty 一运行就内存错误,请问还有什么方法能检测image是否有图片

[解决办法]

Delphi(Pascal) code
  if (Image1.Picture.Width<>0) and (Image1.Picture.Height<>0) then    ShowMessage('有图片')  else    ShowMessage('无图片');
[解决办法]
if Assigned(Image1.Picture.Graphic) then
//有
else
//没有

热点排行