【#文档大全网# 导语】以下是®文档大全网的小编为您整理的《VB 获取本机计算机名、用户名、ip地址的方法代码》,欢迎阅读!
VB 获取本机计算机名、用户名、ip地址的方法代码 Private Sub Command1_Click() Dim aa As String
Dim strLocalIP As String Dim winIP As Object
aa = aa & "本机电脑名称:" & Environ("computername") & vbCrLf aa = aa & "本机用户名称:" & Environ("username") & vbCrLf Set winIP = CreateObject("MSWinsock.Winsock") strLocalIP = winIP.localip
MsgBox aa & "本机IP:" & strLocalIP End Sub
本文来源:https://www.wddqxz.cn/6f9638910c22590102029dec.html