Copy image from webbrowser
This seem to work in vb6 but no longer in vb.net
Dim O As Object
Set O = WebBrowser1.Document.body.createControlRange()
Call O.Add(WebBrowser1.Document.All("imgcode"))
Call O.execCommand("Copy")
Set Picture1.Picture = Clipboard.GetData
Anyone can help?
Re: Copy image from webbrowser
What? VB6 code doesn't work in VB.Net? Gee, who'd have thunk it? There are more examples of webpage manipulation in the Codebank than you can shake a Firefox programmer at so take a look.
Re: Copy image from webbrowser
Here's a codebank post from one of our Moderators. It actually shows a couple of different ways later on down the thread.
Re: Copy image from webbrowser
Dim N As Object
N = web1.Document.DomDocument.body.createControlRange()
N.Add(web1.Document.Images(0).DomElement)
N.execCommand("Copy")
pic1.Image = My.Computer.Clipboard.GetImage()