复制网页中的所有照片 vb.net

copy all photos from a webpage vb.net

你好你好我开始制作一个新的应用程序,我需要使用 vb.net 将照片从网页复制到剪贴板 我已经尝试了几个例子,但我无法让它发挥作用。 好吧,我需要的是右击鼠标,然后从网页上复制照片并插入到列表框中。

使用此代码我可以获得所有页面,但我只需要复制图像我如何在 vb.net 上执行它?

这是我的代码

 Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
    WB.Document.ExecCommand("SelectAll", True, vbNull)
    WB.Document.ExecCommand("Copy", True, vbNull)
    Clipboard.GetImage()
End Sub

好吧,我终于让它工作了,所以我用鼠标右键单击复制,然后复制我只得到一张图像 我让它以不同的方式工作 像这样

Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
    'WB.Document.ExecCommand("SelectAll", True, vbNull)
    'WB.Document.ExecCommand("Copy", True, vbNull)
    Clipboard.GetImage()
    If My.Computer.Clipboard.ContainsImage Then
        PictureBox2.Image = My.Computer.Clipboard.GetImage
    End If


End Sub