101 VB.NET Samples: Getting System & Environment Information

.Net Framk 下如何获得一些有关系统方面的信息呢.应用System.Environment类可以得到这样的结果.

其实它就是基于Windows API的一封装的实现.具体的成员变量和成员函数见MSDN.

下面是MS例子里的说明:

.NET Framework: Getting System & Environment Information

This solution demonstrates the use of several classes that provide environment information, from the System.Environment namespace.

Featured Highlights

The sample form allows you to interact with many of the various methods and properties provided by the System.Environment namespace's objects. The Properties tab demonstrates System.Environment properties, and the Methods tab shows results from running System.Environment methods. The Special Folders tab allows you to retrieve any of the special Windows folder paths, using code that works with enumerations to fill the list of folders. You can also select a single folder, using simple code (see the form's module for details). The Environment Variables tab works in much the same way. Finally, the SystemInformation tab retrieves all the information provided by the SystemInformation object (most of which replaces the GetSystemMetrics Win32 API function).

Requirements

Requires the Trial or Release version of Visual Studio .NET Professional (or greater).

Running the Sample

Press F5 to run the sample project (this loads the sample form).  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值