ahmed ahmed - 7 months ago 101
Vb.net Question

How do I get a computer's name and IP address using VB.NET?

How can i get ip address of system by sending mac ip address as input using vb.net coding?

Answer

Use the My Class :)

My.Computer.Name

as for the IP address quick google search

Private Sub GetIPAddress()

Dim strHostName As String

Dim strIPAddress As String



strHostName = System.Net.Dns.GetHostName()

strIPAddress = System.Net.Dns.GetHostByName(strHostName).AddressList(0).ToString()


MessageBox.Show("Host Name: " & strHostName & "; IP Address: " & strIPAddress)

End Sub