Geo123
asked on
Web Browser Component
Hi all
I would like to open a webpage in a VB.net form. I used to be able to drop a Web Control onto VB6 Form and read HTML and submit values to web forms click buttons all in code
Is there web control that I can drop on VB6 form???
cheers
George
I would like to open a webpage in a VB.net form. I used to be able to drop a Web Control onto VB6 Form and read HTML and submit values to web forms click buttons all in code
Is there web control that I can drop on VB6 form???
cheers
George
ASKER
I managed to work out that the Microsoft Web Control could be ref in .Net...... but when I try to use same code to expose the HTML its not working the same ie
strHTML = wb.Document.body.innerHTML
Any Ideas??
Thanks for web pages but non are exposing the Web Page HTML to my code/ objects
cheers
George
strHTML = wb.Document.body.innerHTML
Any Ideas??
Thanks for web pages but non are exposing the Web Page HTML to my code/ objects
cheers
George
George
Add a reference to Microsoft.mshtml
dim hdoc As mshtml.HTMLDocument - with the scope you want
in your wb_DownloadComplete sub put
hdoc = wb.Document
and you can then access the Web Page HTML through hdoc.
There may be a better way, but that's what I discovered in trying to move from VB (5, in my case) to .NET.
Roger
Add a reference to Microsoft.mshtml
dim hdoc As mshtml.HTMLDocument - with the scope you want
in your wb_DownloadComplete sub put
hdoc = wb.Document
and you can then access the Web Page HTML through hdoc.
There may be a better way, but that's what I discovered in trying to move from VB (5, in my case) to .NET.
Roger
ASKER
ok will give that a go..cheers
How'd it go, George? :)
ASKER
am still testing added the MSHTML like Sancler said but its not exposing web page html like it does in vb6...pain!!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks very much for code sample that was good of you........ me thinks your a bit ahead of me with webstuf..lol!!
Will give it another stab as I do need to get this little project moving!!!
cheers
George
Will give it another stab as I do need to get this little project moving!!!
cheers
George
Take a look at these - it should work similar to your vb6-program:
http://www.c-sharpcorner.com/Internet/WebBrowserInCSMDB.asp
http://www.vb-helper.com/howto_net_set_webbrowser_contents.html
http://www.freevbcode.com/ShowCode.asp?ID=5635 (don't forget this :))
John