Hi
I have two properties, VariantTag (OleVariant) and Picture (IPictureDisp) on an object 'Box'. In order to hide image/picture, I need to put Picture into VariantTag and set Picture = nil. This way the image is not shown, but stored at the same time, so we don't loose it.
to hide image:
Box.VariantTag:=Box.Picture;
Box.Picture:=nil;
The problem is when I would like to show the image. So I need to get it back from VariantTag into Picture.
Box.Picture := Box.VariantTag;
well, the compiler doesn't like this.
I tried some of the SetOlePicture and GetOlePicture examples, but either I don't know how to use these functions, or it's not possible.
I hope someone can help me with this.
Thank you
Tilen
I have two properties, VariantTag (OleVariant) and Picture (IPictureDisp) on an object 'Box'. In order to hide image/picture, I need to put Picture into VariantTag and set Picture = nil. This way the image is not shown, but stored at the same time, so we don't loose it.
to hide image:
Box.VariantTag:=Box.Picture;
Box.Picture:=nil;
The problem is when I would like to show the image. So I need to get it back from VariantTag into Picture.
Box.Picture := Box.VariantTag;
well, the compiler doesn't like this.
I tried some of the SetOlePicture and GetOlePicture examples, but either I don't know how to use these functions, or it's not possible.
I hope someone can help me with this.
Thank you
Tilen