tags:

views:

327

answers:

1

How to get the remote computer name and IP address with vb.net !!! We are running a vb.net application on Intranet. We have users in remote areas who use the application. So I would like to know their computername and password.

+1  A: 

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
M.Shuwaiee
how to use the My class ?
ahmed
If you are using VB.Net 2.0 or better you should be able to use it out of the box :)
M.Shuwaiee