Click here to Skip to main content
12,063,645 members (68,314 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB 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 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 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160204.4 | Last Updated 15 Dec 2012
Copyright © CodeProject, 1999-2016
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