Ok, I found a way to get the value a the txtVersion when the page is not in a frameset :
VB Code:
Private Sub AxWebBrowser1_DownloadComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxWebBrowser1.DownloadComplete
Dim document As mshtml.HTMLDocument = DirectCast(AxWebBrowser1.Document, mshtml.HTMLDocument)
Dim form As mshtml.HTMLFormElement = DirectCast(document.forms.item(0), mshtml.HTMLFormElement)
Dim Version As String = DirectCast(form.item("txtVersion"), mshtml.HTMLInputElement).value
MsgBox("Version : " & Version)
End Sub
Do you have an idea when the page is in the second frame of a frameset ?
This doesn't work :
VB Code:
Private Sub AxWebBrowser1_DownloadComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles AxWebBrowser1.DownloadComplete
Dim document As mshtml.HTMLDocument = DirectCast(AxWebBrowser1.Document, mshtml.HTMLDocument)
Dim frame1 As mshtml.HTMLFrameElement = DirectCast(document.frames.item(0), mshtml.HTMLFrameElement)
Dim frame2 As mshtml.HTMLFrameElement = DirectCast(document.frames.item(1), mshtml.HTMLFrameElement)
Dim form As mshtml.HTMLFormElement = DirectCast(frame2.forms.item(0), mshtml.HTMLFormElement)
Dim Version As String = DirectCast(form.item("txtVersion"), mshtml.HTMLInputElement).value
MsgBox("Version : " & Version)
End Sub