Connecting to another computer via sockets (which I have somewhat succeeded at, yay me) involve typing in the IP Address of the host computer, which my professor deemed "not user friendly".
My previous program involved using a Server, which is now no longer needed due to the Socket connection stuff. The code I used back then was to list down the Network names, something my professor liked very much.
NetworkBrowser nb = new NetworkBrowser();
foreach (string pc in nb.getNetworkComputers())
{
lstNet.Items.Add(pc);
}
Would it be possible to, say, use that code, and have the program retrieve the IP Address (IPv4, if possible) when the User selects a Computer name on the network? This would be done before any socket connection is made.
Or if that fails / is impossible, how would I list down the IP Addresses of the computers in a Listbox? I'm really not sure how to implement that ARPing thing I keep hearing about.
Unfortunately, my school runs only .NET 2.0, so I'm afraid my only option is C# Windows Forms, and no WCF or anything.
Many thanks to all and any who answer.