How to get a notification from an embedded web browser

C

Carlos

Hi all,

I have a windows forms app with an embedded web browser control.
I would like to maintain the OK button on the form disabled until the
user gets something done using the browser. I just do not
know how can the windows form app can get notified
about it, and enable the OK button..

Thanks!

Carlos.
 
S

Scott M.

The browser control exposes the document object of the web page being
displayed, you would interrogate the document to determine if the job is
done and then update the form accordingly.

-Scott
 
C

Carlos

Scott,

thank you for your prompt reply. However, when I try to do it
I get an exception.

I have a label in the app that tries to obtain the contents of a label (i.e.
text)
I do use this code when loading the form that has already a web browser
control
embedded in the form, and pointing to a URL that has as a label control
'mLabel'

***
Dim document As System.Windows.Forms.HtmlDocument = WebBrowser1.Document
MsgBox(document.All("mLabel").GetAttribute("Text"))
***
What is wrong with this? Thanks again in advance
Carlos.

:
 

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