日期:2009-03-25  浏览次数:20505 次

可以用以下代码得到本机IP地址.

        Dim abc() As IPAddress

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