HRESULT_FAILED thrown upon StatusTextChange from AxWebBrowser

G

Guest

Hello,

I have a AxWebBrowser control. I need to be able to display to the user
what the browser is doing (loading, downloading, done, etc...).

I used this event:

private void TestWebBrowser_StatusTextChange(object sender,
AxSHDocVw.DWebBrowserEvents2_StatusTextChangeEvent e)
{
TestWebBrowserStatusField.Text = TestWebBrowser.StatusText;

// MessageBox.Show("Called");

}

The event will get called, but the property TestWebBrowser.StatusText will
fail and give me an HRESULT error:

Error HRESULT E_FAIL has been returned from a call to a COM component.

What am I doing wrong? I can get this to work using WebBrowser, but not
AxWebBrowser. I need to use AxWebBrowser with my project.

Thank you all for reading this. I hope someone can help us.

Rob
 
G

Guest

Problem solved. You have to set it using e.text, not
TestWebBrowser.StatusText. Guess you can't access the status.text field for
some reason.

Rob K
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top