I've made an IP finder! I had a look on the web for 'get ip' code and I couldn't find any(that I understood); so I put some together and came up with my application :)
Application:
[Link to compiled executable removed — Mod]
Code:
Code:Imports System
Imports System.Net.Dns
Public Class Main
Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim shostname As String
shostname = System.Net.Dns.GetHostName
Console.WriteLine("Your Machine Name = " & shostname)
Console.WriteLine("Your IP = " & GetIPAddress())
TextBox1.Text = shostname
txtip.Text = "" & GetIPAddress()
End Sub
Shared Function GetIPAddress() As String
Dim oAddr As System.Net.IPAddress
Dim sAddr As String
With System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName())
oAddr = New System.Net.IPAddress(.AddressList(0).Address)
sAddr = oAddr.ToString
End With
GetIPAddress = sAddr
End Function
End Class
