Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 如何在geckofx web浏览器控件中获取特定于图像的图像_Vb.net_Geckofx - Fatal编程技术网

Vb.net 如何在geckofx 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

我正在另一个应用程序中使用web浏览器控件。我试着用下面的代码复制图像,效果很好

   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浏览器控件获取图像