1. Start a new project (doesn't matter what it is as long as it has either a startup form or a sub main())
2. Import the System.Net library:
^That code goes above all of your other code
3. Initialize a new webclient (this can be global or for a single sub/function, it doesn't matter)
4. Declare a string to store the source code in
5. Using any event you like (clicking a button, pushing a key, etc.), call on the DownloadString class of the webclient:
strString = wcWebClient.DownloadString("http://www.website.com/")
strString is the name of your string you declared earlier, wcWebClient is the name of the webclient you created.
You're now done.
Example code:
Imports System.Net
Public Class Form1
Dim wcWebClient As New Webclient
Dim strString As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
strString = wcWebClient.DownloadString("http://www.google.ca/")
End Sub
End Class
How is this useful at all? Well with the source from a webpage you can parse information. This is what Runescape clients use for example to parse through online databases.