AngryC
asked on
How can I send some HTML code to TWebBrowser control?
Hello,
I have a TWebBrowser control on my form and I want to send some HTML code to it.
How can I do that?
Thanks.
I have a TWebBrowser control on my form and I want to send some HTML code to it.
How can I do that?
Thanks.
ASKER
Thanks but I think there's a direct way to do the thing without saving.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys.
Cesario,
Can you tell me what's the benefits of the following:
while WebBrowser.ReadyState < READYSTATE_INTERACTIVE do
Application.ProcessMessage s;
?
Cesario,
Can you tell me what's the benefits of the following:
while WebBrowser.ReadyState < READYSTATE_INTERACTIVE do
Application.ProcessMessage
?
Cesario,
If WebBrowser.ReadyState is less than READYSTATE_INTERACTIVE means that the browser might not initialized and it might not have loaded all of its properties. In this state ususally any interaction with the browser should be avoided.
The above code helps you to make sure that the browser is initialized and has loaded all of its properties and it is ready to process your request (e.g. requesting a web page etc.)
If WebBrowser.ReadyState is less than READYSTATE_INTERACTIVE means that the browser might not initialized and it might not have loaded all of its properties. In this state ususally any interaction with the browser should be avoided.
The above code helps you to make sure that the browser is initialized and has loaded all of its properties and it is ready to process your request (e.g. requesting a web page etc.)
Atul_parmar,
thanx for your comment :-)
thanx for your comment :-)
ASKER
Ok, just one question more. Should I use Cesario's code or the following:
http://www.cryer.co.uk/brian/delphi/twebbrowser/put_HTML.htm
http://www.cryer.co.uk/brian/delphi/twebbrowser/put_HTML.htm
First Save the HTML Code the a html File and try to load it by
WebBrowser1.Navigate('thef