|
-
Jan 4th, 2009, 10:17 AM
#1
Thread Starter
New Member
[2008] Using MSHTML with Extended Webbrowser. Getting error.
I trying to make form filler, but I faced some difficulties.
There is a greate example in this kleinma`s thread http://www.vbforums.com/showthread.php?t=416275, but axWebbrowser sometimes doesn't fire DocumentComplete event. In that thread, there was said that its much better to use Extended Webbrowser control, because it has advantages of standard Webbrowser and axWebbrowser.
When I trying to do the kleinma`s example actions(for example, set textfield value) with Extended Webbrowser:
Code:
Private Function GetCurrentWebDoc(ByVal wb As WebBrowser) As MSHTML.HTMLDocument
Try
Return DirectCast(wb.Document, MSHTML.HTMLDocument)
Catch ex As Exception
Return Nothing
End Try
End Function
I get exception
Unable to cast object of type 'System.Windows.Forms.HtmlDocument' to type 'MSHTML.HTMLDocument'
Could you tell me, what am I doing wrong?
Thanks in advance.
PS: Sorry for my English...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|