How can I detect the IP Address of the workstation where my program is curently running (Thorugh code)?
Printable View
How can I detect the IP Address of the workstation where my program is curently running (Thorugh code)?
Use I client/server app I doubt the hostname would change so you can log on with the hostname then retreive the ip address. Use this code to get the ip address:
VB Code:
Private Sub Command1_Click() Text1.Text = Winsock1.RemoteHostIP End Sub
Umm u might be able to get it out of the Registry... you can pull other stuff out of it, why not the IP Address?
Check out the attachment