How to get a notification from an embedded web browser

  • Thread starter Thread starter Carlos
  • Start date Start date
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.
 
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
 
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.

:
 
Back
Top