


HtmlElementCollection hecImages = ("img") //Browse Through HTML Tags wcObj = new () //Create New Web Client Object WcObj.DownloadFile(hecImages(i).GetAttribute("src"), strPath1 & "\images\" & i.ToString() & ".jpg")Ĭ# private void btnIDGet_Click(object sender, EventArgs e) StrPath2 = strPath1 & "\Images" 'Create Images Sub Folderĭim diTitle As DirectoryInfo = Directory.CreateDirectory(strPath1)ĭim diImages As DirectoryInfo = Directory.CreateDirectory(strPath2)įor i As Integer = 0 To hecImages.Count - 1 'Loop Through All IMG Elements Found StrPath1 = "c:\" & strWebTitle 'Create Folder Named Web Page Title StrWebTitle = Me.wbID.DocumentTitle 'Obtain Web Page Title VB.NET Private Sub btnIDGet_Click(sender As Object, e As EventArgs) Handles btnIDGet.Clickĭim wcObj As New () 'Create New Web Client Objectĭim hecImages As HtmlElementCollection = ("img") 'Browse Through HTML Tagsĭim strWebTitle As String 'Web Page Title This also assumes your WebBrowser Control was named wbID as was the case with mine. The above code segment instructs the WebBrowser Control to navigate to the entered site. WbID.Navigate(txtIDURL.Text) //Navigate To URL WbID.Navigate(txtIDURL.Text) 'Navigate To URLĬ# private void btnIDGo_Click(object sender, EventArgs e) VB.NET Private Sub btnIDGo_Click(sender As Object, e As EventArgs) Handles btnIDGo.Click

Now let’s handle the navigation button that will enable us to navigate to a site: Let’s start with importing the Namespaces. I will illustrate both VB.NET as well as C#. I am using pictures from websites that provide them for free.Īnyways, enough about me, let us get started with our little project Designįire up Visual Studio 2012 and choose your desired programming language. Note: some pictures are copyrighted, and must not be used in any way. With this article I will demonstrate how to download images from a webpage. Because of the tedious nature of collecting new wallpapers, I have decided to make a little tool to do all the hard work for me. Some of you might remember this old dinosaur project of mine, which I still use successfully to change my desktop backgrounds. What you might not know is that I appreciate good art as well, seeing the fact that my wife is quite good at painting and creating things out of nothing. As you might know, I have always been fascinated with Wallpapers and photos.
