`

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).

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics