My program has a TImage component in a form.
In some situation, the program should check:
If "there is an image assigned to the TImage component's image property" then .............
How can i do this?
Thanks in advance.
if Image.Picture.Bitmap.Empty then DoStuff
Better late than never! The right way:
if Assigned(Image1.Picture.Graphic) then ...
You are not talking, but I am assuming that you are talking about Delphi.
You can check if there is a bitmap in the TImage control by testing:
if Image.Picture.Bitmap.Width > 0 then // do whatever