We help IT Professionals succeed at work.

Borland Builder create an instance of TPicture at runtime

lirtua
lirtua asked
on
Medium Priority
407 Views
Last Modified: 2006-11-17
Given a Form with an Image, how do you set the Image's Picture property with a dynamically created instance of a TPicture?

The TPicture should be the same size as the Image, BMP format, with all pixels black.
Comment
Watch Question

Commented:
Draw on the Image's Canvas directly and reference the Bitmap property....

For example:
Image1->Canvas->Brush->Color=clBlack;
Image1->Canvas->FillRect(Image1->Canvas->ClipRect);


and the bitmap:


Image1->Picture->Bitmap->SaveToFile("Z:\\test.bmp");


Good luck!!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.