Page 1 of 1

OLE Container and HTML

Posted: Sun Apr 30, 2006 4:41 pm
by Hanno
Hi,

I saw some posts on showing OLE in RTF, but is there a way to convert the OleContainer into an image, when saving to html?

Posted: Mon May 01, 2006 6:03 pm
by Sergey Tkachenko
I am not sure about the best solution, but it seems that OleContainer.PaintTo works.
You can use
function DrawControl(ctrl: TControl): TBitmap;
from CtrlImg unit to create a bitmap from OleContainer (this function uses PaintTo inside).
Do not forget to free this bitmap after saving.

For saving in HTML, use OnSaveComponentToFile event.

Posted: Wed May 03, 2006 10:36 am
by Hanno
Lovely, thanks, that works well :-)