明辉手游网中心:是一个免费提供流行视频软件教程、在线学习分享的学习平台!

得到本机IP地址的代码.

[摘要]可以用以下代码得到本机IP地址.Dim abc() As IPAddressDim aaa As IPHostEntryMsgBox(Dns.GetHostName())aaa = Dns.GetHostByName(Dns.GetHostName())abc = aaa.AddressListM...
可以用以下代码得到本机IP地址.

Dim abc() As IPAddress
Dim aaa As IPHostEntry
MsgBox(Dns.GetHostName())
aaa = Dns.GetHostByName(Dns.GetHostName())
abc = aaa.AddressList
MsgBox(abc(0).ToString)