Hello, i'm making a small little app that pings all ips on a network from 192.168.0.1 to 192.168.0.255 and populates the active IPs into a listbox. Then from there i want you to be able to select one to look up the machines name on the LAN.
Private Sub Lookup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Lookup.Click Dim sel As String If ListBox1.Items.Count = 0 Then MessageBox.Show("No IP Selection!") Else 'Puts IP into string sel = ListBox1.SelectedItem.ToString() 'SHOULD show the host name but is only one MessageBox.Show(System.Net.Dns.GetHostEntry(sel).HostName) End If End Sub
But this code doesn't return IP's that are not... me... basically.
It only returns the name of the machine that is searching, not other machines.
Any Help is Greatly appreciated :)