Dim IPAdress As System.Net.IPAddress= System.Net.Dns.GetHostByName(HostName).AddressList.GetValue(0) \'获得本机的IP
Dim HostName As String = System.Net.Dns.GetHostName \'获得本机的机器名
Dim s3 As String =IPAdress.Tostring
Dim s As String =s3.SubString(s3.Length -3,3)
Public fwq As String
Select Case s
Case "101"
fwq ="1"
Case "103"
fwq ="2"
Case "105"
fwq ="3"
Case "107"
fwq ="1备"
Case "109"
fwq ="2备"
Case "111"
fwq ="3备"
Case "115"
fwq ="库1"
Case "116"
fwq ="库2"
Case Else
fwq =""
End Select