Click here to Skip to main content
15,886,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello

i was just wondering if any can provide me simple coding to allow me to list the current desktop ip address , desktop name , location for example - (united Kingdom) and temp of CPU on load using my winform.
i would like it to list by using labels
i want to add these to my project as it will cool for those who use it more added feature for my tool so if you can provide the simple ways please it will be much appreciated
thanks

What I have tried:

i have tried many codes but not be came any help hope others can help
Posted
Updated 16-Aug-16 8:11am

Your desktop IP won't help you much - it'll be 192.168.x.x which is always a local LAN address. But... Retrieving IP and MAC addresses for a LAN[^] will help you get it.
You can get your Router IP address, and you can get some info from it, but ... it's not generally very useful either for location purposes: Using IP based Geolocation - and why it's pretty much useless.[^]
 
Share this answer
 
Here is the article i wrote some years ago, it is in another CodeProject profile of mine, that was closed by CodeProject, but you can view it...

As for the Desktop Name u can use
My.Computer.UserName...
My.Computer.Environment...
etc.

Retrieve information about your IP[^]
 
Share this answer
 
Comments
oxzy's Modz uk 16-Aug-16 14:18pm    
thank you for linking me to your project source this looks a little better to learn from.
if i use any codes i will sure to credit the site and owner of each source i use if i have any problem i will let the site know thank you
[no name] 16-Aug-16 14:21pm    
that's no problem u can use it. also keep in mind that the whole project is based on a active Internet connection, even the IPs are downloaded from the site. OriginalGriffs version of getting IP Address does not use Internet.
oxzy's Modz uk 16-Aug-16 14:29pm    
its more of a search ip i was looking for auto information from desktop for my form
[no name] 16-Aug-16 14:40pm    
There are 2 kinds of IPs that your Computer is linked to. One is PUBLIC, that is assigned to identify your Computer for the Ethernet broadcast. Public IPs are also linked with a domain, for example, www.facebok.com.
As for the local IP, it is Private. If you have a wireless router, your local IP is used to identify within many devices. So nobody can enter any PC from a local IP, except you, if you link many PCs into a net of devices.
For example;
Your PC = 192.168.1.5
Your Phone = 192.168.1.6
etc..
oxzy's Modz uk 16-Aug-16 14:47pm    
i was looking for something a little simple like this one here

label18.Text = (Dns.GetHostName());

but reading more info from the desktop so it more short for when i put inside the load form

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900