I want VB.NET code for getting the systems names and ip addresses in a lan
Printable View
I want VB.NET code for getting the systems names and ip addresses in a lan
Hi guys...
Now I too have the same problem...Is there any solution for this ???
(Import System.NET first)
Dim strHost As String
strHost = Dns.GetHostName()
Dim iphe AS IPHostEntry
iphe = Dns.GetHostByName(strHost)
mendhak's code only gets the ip address and hostname of the machine that the code is running on
Hi,
Use the System.Net.DNS class, which provides de shared GetHostName and GetHostByName methods.
Try this;
VB Code:
Dim HostName As String Dim IPAddress As String ' Look up the host name and Ip address HostName = System.Net.Dns.GetHostName() IPAddress = System.Net.Dns.GetHostByName(HostName).AddressList(0).ToString() Console.WriteLine("Host name:" & HostName) Console.WriteLine("IP address:" & IPAddress)
Hope it helps,
sparrow1
Hi...
Thats really great job done by u..
but as JuggaloBrotha said,both this will give the IP and system name of the mechine on which the application is running,But as a Administrator I would like to monitor all the systems from my PC..Is it possible???