Add a TWEBBROWOSER control, then use the following code to write the page data to the TWEBBROWOSER control to display:
Procedure TFORM3.BUTTON1CLICK (Sender: TOBJECT); VARDOC: Olevariant; Begin WebBrowser1.naviGate ('About: blank'); WebBBrowser1.oleObject.Document.close;
Doc: = webbrowser1.document; doc.write (HTML text); // "HTML text" = HTML language text required to display, string format WebBrowser1.Refresh;
END;
This method has a disadvantage that IE5 and below are not supported. If you have a better solution, please give a point.