Private Sub Command1_Click() '获取自己的外网 IP
'添加 Inet 控件,Textbox 控件各一个
Dim ym$, a%, b%
ym = Inet1.OpenURL("
http://www.ip138.com/ip2city.asp")
If ym = "" Then MsgBox "连接错误": Exit Sub
a = InStr(ym, "您的IP地址是:[")
If a <> 0 Then
b = InStr(a, ym, "]")
Text1 = Mid(ym, a, b - a + 1)
End If
End Sub