Guys I was just wondering if I could create a simple downloader created using VB 2008. The user will enter the complete address of a file from the internet, click the Download button then the downloading process will start. There should also be a button labeled "Paste" which will paste a valid path (copied into the Clipboard) into a textbox .

I hope you can imagine the scenario.

Look this.

Even more detailed help here.

See if this helps to check the Clipboard data for a valid URL.

If Clipboard.ContainsData(DataFormats.Text) Then '// check if Data in Clipboard is Text.
            Dim sTemp As String = Clipboard.GetData(DataFormats.StringFormat).ToString '// get Data.
            '// check if Data .StartsWith("http://") to make sure it is a URL
            '--- AndAlso check if the last part ends with a ".", common for files that download(.exe,.png, .etc.).
            If sTemp.StartsWith("http://") AndAlso sTemp.Substring(sTemp.LastIndexOf("/")).Contains(".") Then
                TextBox1.Text = sTemp '// add Data to TextBox.
            Else '// if not a valid URL, notify user.
                MsgBox("Invalid URL.")
            End If
        End If

Codeorder and RenanLazarotto, thanks. A lot. Solved!

You're welcome.
And you have to thank much more codeorder, it all his codes (:

And also mark as solved this thread too.

Wait, how about the downloading part?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.