在C#winform上加载桌面信息 [英] Loading desktop infomation on C# winform

查看:109
本文介绍了在C#winform上加载桌面信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



i只是想知道是否有任何可以提供我简单的编码,让我列出当前的桌面IP地址,桌面名称,位置例如 - (联合使用我的winform加载CPU的临时值。

i希望它使用标签列出

i希望将这些添加到我的项目中,因为它会为那些使用它为我的工具增加了更多的功能,所以如果你能提供简单的方法,那将非常感谢

谢谢



我曾尝试过:



i尝试了很多代码,但没有得到任何帮助希望其他人可以帮助

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

推荐答案

您的桌面IP对您没什么帮助 - 它将是192.168.xx,它始终是本地LAN地址。但是...... 检索局域网的IP和MAC地址 [ ^ ]将帮助您获得它。

您可以获得您的路由器IP地址,并且您可以从中获取一些信息,但是......它通常对于位置目的而言非常有用:使用基于IP的地理位置 - 以及为什么它几乎没用。 [ ^ ]
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.[^]


这是几年前我写的文章,它在我的另一个CodeProject配置文件中,由CodeProject关闭,但你可以查看它...



至于桌面名称你可以使用

My.Computer.UserName ...

My.Computer.Environment ...





检索有关您的IP的信息 [ ^ ]
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[^]


这篇关于在C#winform上加载桌面信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆