E
Eng Teng
What is the command to display computer name & ip address in VB.NET 2005 (OS
WindowsXP & Windows Vista)
Regards,
Tee
WindowsXP & Windows Vista)
Regards,
Tee
Eng Teng said:What is the command to display computer name & ip address in VB.NET
2005 (OS WindowsXP & Windows Vista)
What is the command to display computer name & ip address in VB.NET 2005 (OS
WindowsXP & Windows Vista)
Regards,
Tee
What is the command to display computer name & ip address in VB.NET 2005
(OS
WindowsXP & Windows Vista)
Regards,
Tee
How about Service Pack info ?
Hi Eng,
For short ways,
' To display computer name:
My.Computer.Info.OSFullName
' To display local IP:
Imports System.net
Module Module1
Sub Main()
'To get local address
Dim sHostName As String
Dim i As Integer
sHostName = Dns.GetHostName()
Dim ipE As IPHostEntry = Dns.GetHostByName(sHostName)
Dim IpA() As IPAddress = ipE.AddressList
For i = 0 To IpA.GetUpperBound(0)
Console.Write("IP Address {0}: {1} ", i, IpA(i).ToString)
Next
Console.ReadLine()
End Sub
End Module
Hope this helps,
Onur Güzel