Vb.net 如何在geckofx web浏览器控件中获取特定于图像的图像
我正在另一个应用程序中使用web浏览器控件。我试着用下面的代码复制图像,效果很好Vb.net 如何在geckofx web浏览器控件中获取特定于图像的图像,vb.net,geckofx,Vb.net,Geckofx,我正在另一个应用程序中使用web浏览器控件。我试着用下面的代码复制图像,效果很好 Dim doc As IHTMLDocument2 = _ DirectCast(webBrowser1.Document.DomDocument, IHTMLDocument2) Dim imgRange As IHTMLControlRange = _ DirectCast(DirectCast(doc.body, _ HTMLBody).createContr
Dim doc As IHTMLDocument2 = _
DirectCast(webBrowser1.Document.DomDocument, IHTMLDocument2)
Dim imgRange As IHTMLControlRange = _
DirectCast(DirectCast(doc.body, _
HTMLBody).createControlRange(), IHTMLControlRange)
For Each img As IHTMLImgElement In doc.images
imgRange.add(DirectCast(img, IHTMLControlElement))
imgRange.execCommand("Copy", False, Nothing)
Using bmp As Bitmap = DirectCast( _
Clipboard.GetDataObject().GetData(DataFormats.Bitmap), Bitmap)
bmp.Save("C:\" + img.nameProp)
End Using
Next
但现在我在应用程序中使用GeckoFX Web浏览器控件。所以任何人都可以帮助如何使用GeckoFX web浏览器控件获取图像