方法一——最简单在 工程菜单的部件里找到Microsoft Winsock控件然后添加。。它就显示在工具栏上winsock1。本地主机名方法二——最正统private Declare Function get computer name Lib " kernel 32 " Alias " get computer namea "(ByVal LP buffer As String,nSize As Long)Long
Public Function get computer()As String
Dim strCompName As String
Dim in handle As integer str compname = String(256," "