偶尔来接点分:
程序部份:
Dim i, j
Dim xo, yo
Dim myip As String
For i = 0 To wb.Document.All.length - 1
If UCase(wb.Document.All(i).tagName) = "INPUT" Then
xo = wb.Document.All(i)
If LCase(xo.Type) = "text" Then
myip = xo.Value
Exit For
End If
End If
Next i
myip就是得到的外网IP
WB定义如下: Friend WithEvents wb As AxSHDocVw.AxWebBrowser
wb.Navigate("放在网上的一个网页地址:")
里面放一个input控件,用ASP,ASP。NET使他显示IP地址。