您的位置:首页 > 编程语言 > VB

101 VB.NET Samples: Getting System & Environment Information

2005-10-18 12:14 501 查看
.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).  

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐