Click here to Skip to main content
11,490,282 members (32,592 online)
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 14:10pm
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  
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

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 520
1 Andy Lanng 233
2 OriginalGriff 188
3 Sascha Lefèvre 170
4 Maciej Los 160
0 Sergey Alexandrovich Kryukov 9,713
1 OriginalGriff 8,475
2 Sascha Lefèvre 3,504
3 Maciej Los 3,106
4 Richard Deeming 2,370


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100