Grab webpage images
Learn how to create Add-Ins of all types for V3-R and share your own tutorials with others.
1 post
Page 1 of 1
How to get a list of all images on the currently selected tab webpage
In this example I will show you how to get a list of links to all webpage images and display them in a ListBox control using the: SlotAddIn.Interaction.GetDoc command:
And thats it. You change the code to display the images in other controls like a listview, richtextbox or even download them all its upto you.
Happy coding cooll;
In this example I will show you how to get a list of links to all webpage images and display them in a ListBox control using the: SlotAddIn.Interaction.GetDoc command:
Code: Select all
Dim WebImage
Dim i As Integer
For i = 0 To SlotAddIn.GetDoc.Images.Count - 1
Try
WebImage = SlotAddIn.GetDoc.Images(i).GetAttribute("src")
If Not IsNothing(WebImage) Then
If Not ListBox1.Items.Contains(SlotAddIn.GetDoc.Images(i).GetAttribute("src")) Then
ListBox1.Items.Add(SlotAddIn.GetDoc.Images(i).GetAttribute("src"))
End If
End If
Catch ex As Exception
End Try
Application.DoEvents()
WebImage = Nothing
Next
And thats it. You change the code to display the images in other controls like a listview, richtextbox or even download them all its upto you.
Happy coding cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023