[VB.NET 2010]Random External IP Viewer

12/09/2011 17:23 summoner01#1
Just a random app I made to test httpwebrequest. May be useful to some who wish to get their External IP address on the fly without having to open up a browser and do a search for a website, then copy the ip etc.

VT Info:

Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://www.whatismyip.org/")
        Dim response As System.Net.HttpWebResponse = request.GetResponse

        Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
        Dim regsource As String = sr.ReadToEnd

        TextBox1.Text = regsource
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Clipboard.SetText(TextBox1.Text)
    End Sub
End Class
12/09/2011 17:29 vwap#2
Wrong Section.
Post here: [Only registered and activated users can see links. Click Here To Register...]
12/09/2011 17:35 summoner01#3
Ah thanks for telling me, I did not know.

#Request to remove thread please.