明辉站/网站教程/内容

得到本机IP地址的代码.

网站教程2024-02-13 阅读
[摘要]可以用以下代码得到本机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)

……

相关阅读