VB获取本机IP地址 - 洛阳翼展电脑


VB获取本机IP地址

2023-1-7 乱云飞

Private Sub Command1_Click()
strComputer = "." '//http://80c.cc
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set IPConfigSet = objWMIService.ExecQuery("Select IPAddress from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each IPConfig In IPConfigSet
If Not IsNull(IPConfig.IPAddress) Then
For i = LBound(IPConfig.IPAddress) To LBound(IPConfig.IPAddress)
MsgBox "本机内网IP地址是:" & IPConfig.IPAddress(i)
Next
End If
Next
End Sub
本文链接:http://80c.cc/ez/614.html
0

发表评论:

VirtualCamera:在录像机中虚拟一个通道显示电脑桌面、视频文件、USB摄像头~
预ICP备10086-001号 © 翼展网/80C.CC 技术支持/洛阳翼展科技
TEL / 13213610060 QQ / 345794501
Powered by emlog