101 VB.NET Samples: Getting System & Environment Information
2005-10-18 12:14
501 查看
.Net Framk 下如何获得一些有关系统方面的信息呢.应用System.Environment类可以得到这样的结果.
其实它就是基于Windows API的一封装的实现.具体的成员变量和成员函数见MSDN.
下面是MS例子里的说明:
其实它就是基于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).相关文章推荐
- vb CreateObject("Scripting.FileSystemObject") 48错误
- The steps for setting up the system environment path variable for VS 2010 & .NET 4.0
- n unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.Additional information: 未能加载文件或程序集“..
- <serviceHostingEnvironment>——引发的<system.serviceModel>
- Environment.CurrentDirectory & System.Windows.Forms.Application.StartupPath
- 101 VB.NET Samples - How-To Configuration Settings
- 101 VB.NET Samples - How-To Service Manager
- Getting SubnetMask through System.Net.NetworkInformation
- SystemVerilog VMM Workshop Lab Guide(LG)学习笔记-Lab1 VMM Environment & Message Service
- 101 VB.NET Samples --XML文件的处理
- Exception: Environment variable "SYSTEMROOT" required to be set to valid path
- Unknown table 'system_sequences' in information_schema
- ZwSetSystemInformation 动态加载驱动(转)
- eclipse导入项目报错 :Unbound classpath container: 'JRE System Library'
- (二十二)unity4.6学习Ugui中文文档-------交互-Eventsystem & Binding
- System.Web.Hosting.HostingEnvironmentException: 访问 IIS 元数据库失败
- 无法打开workflow的设计界面--缺'System.Workflow.ComponentModel.Compiler.ITypeProvider'
- 【raviramamoorthi-Computer Graphics】OpenGL1:Window System & Callbacks
- BlueROV-17: Install Python Virtual Environment & Github
- 关于VB错误“文件未找到:'c:/windows/sytem32/ieframe.dll/1'“的解决方法