Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
hi,
 
i have a problem here. i need code in vb.net to detect the computer name n the ip address....tq
Posted 14-Dec-12 13:10pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

 Private Function IPAddress() As String
            Dim strIP As String = ""
            Dim LocalHostName As String
            Try
                LocalHostName = Dns.GetHostName()  'Here u will get ur system Name
                Dim ipEnter As IPHostEntry = Dns.GetHostEntry(LocalHostName)
                Dim IpAdd() As IPAddress = ipEnter.AddressList
                strIP = IpAdd(0).ToString()
                Return strIP  'It will return ipaddress of ur system
            Catch ex As Exception
                Throw New Exception(ex.Message)
            End Try
        End Function
 
and add namespace:
Imports System.Net
  Permalink  
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

how do you want to get the PC name , by win form or aspx ?
  Permalink  
Comments
shantapanic at 14-Dec-12 19:48pm
   
actually i want to run task manager of other ppl s pc from my laptop.....so i need to click on the PC name of other to run the task manager from my laptop
shantapanic at 14-Dec-12 20:04pm
   
can i get by both aso....by win form and aspx...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Fetch Computer Name By
MsgBox(My.Computer.Name)
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 589
1 OriginalGriff 379
2 CPallini 205
3 RyanDev 175
4 Sergey Alexandrovich Kryukov 160
0 OriginalGriff 5,689
1 Sergey Alexandrovich Kryukov 4,783
2 Peter Leow 2,954
3 Maciej Los 2,819
4 DamithSL 2,465


Advertise | Privacy | Mobile
Web04 | 2.8.140718.1 | Last Updated 15 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid