如题

解决方案 »

  1.   

    result := image.picture <> nil;
      

  2.   

    图片删除之后,要跟上把这个图片变量赋值为nil。他说的没有问题。如果你删除图片用FreeAndNil来删除。
      

  3.   

    if Image.Picture.Graphic <> nil then
    begin
    .........
    end;楼主我的好像可以啊~~~~~~~~
    不明白为什么你的不行
      

  4.   

    Result := Image1.Picture.Graphic = nil;
    清除图片:
      Image1.Picture.Graphic.assign(nil);
      Image1.Picture.Graphic := nil;//必须
      

  5.   

    哦,不对不对。我看看啊。如果是位图,判断一些Bitmap是不是为空。Result := Image.Picture.Bitmap.Empty;如果是Jepg的我还不知道,稍等。
      

  6.   

    就是判断 Image.Picture.Graphic 是否为空。嘿嘿,有人回答了。
      

  7.   

    上面的可以了,不过好象没有那么复杂image1.picture.graphic:=nil;  //清除图片if image1.picture.graphic<>nil then   //有图片
       ...
    else                                  //没有图片
       ...;
      

  8.   

    if Image1.Picture.Graphic.Empty = true then begin
      ...
    end
    else begin
      ...
    end;
      

  9.   

    if Image1.Picture.Graphic.Empty = true then begin//这种代码是没有效率的
    _>>>
    if Image1.Picture.Graphic.Empty then // 不就OK了 节约了CPU时间/空间
      

  10.   

    呵呵 多谢大家  我试出来了    Image1.Picture.Graphic=nil 这条语句就可以了