.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).
分享到:
相关推荐
These samples demonstrate many of the new features available with Visual Basic 2008 and the .NET Framework 3.5 including hundreds Language Integrated Query (LINQ) samples. The following is the list ...
vb.net 串口源码
很多常用的Linq写法,基于Vb.net,本人收获良多 LinqSamples LinqToSQLSamples LinqToXMLSamples LinqToDataSetSamples 举例:Linq to sql Dim categories = From prod In db.Products _ Group By Key = New With ...
微软出版 “101 Microsoft® Visual Basic® .NET Applications” 的配套代码。比较老的东东,难度覆盖入门到中等的技巧。
Tested were hundreds of Microsoft sample projects (101 VB.Net samples, DirectX samples, etc.), in house and customer projects, third party control samples (Infragistics, ComponentOne, Telerik, etc.),...
VB101Samples
Samples of payroll_manager VB.net
Symbol Mobility Developers Kit for .NET Samples Documentation
WINCE c#开发经典!
Microsoft® .NET: Architecting Applications for the Enterprise Paperback: 304 pages Publisher: Microsoft Press (October 15, 2008) Language: English ISBN-10: 073562609X ISBN-13: 978-0735626096 Format:...
SINUMERIK .NET SDK示例在这里,您将找到C#和VB.NET的示例项目,以使用我们的SINUMERIK .NET SDK指导SINUMERIK应用程序的开发人员。 每个样本均按原样提供,而对准确性和正确性没有任何保证,尤其是在生产环境中。...
[SitePoint] ASP.NET 3.5 个人网站创建指南 (C# & VB 实现) (英文版) [SitePoint] Build Your Own ASP.NET 3.5 Web site Using C# & VB (E-Book) ☆ 图书概要:☆ ASP.NET allows Web Developers to create ...
OPC UA .NET SDK示例在这里,您将找到C#,VB.NET和C ++ / CLI的示例项目,以指导使用我们的OPC UA .NET SDK的OPC UA客户端和服务器应用程序的开发人员。 每个样本均按原样提供,而对准确性和正确性没有任何保证,...
Aspose.Words.NET+Samples
在Bass官网上下载的C#实例运行提示缺少basswma.dll文件。此文件能解决此问题。注意:此文件只支持X86下使用!
The samples of the release package all TESTED on Sql Server 2005 Express, MySql 5.0, SQLite 3, Access 2003, Firebird 2.1.0, PostgreSQL 8.3.3 and Oracle 10g express. Features: Linq support (need .net...
MICROSOFT .NET FRAMEWORK 2.0 SDK SAMPLES
Windows-universal-samples:通用Windows平台的示例.2024年最新版,取自于github微软库
# Official OPC UA .Net Standard Samples from the OPC Foundation ## Overview Sample Servers and Clients, including all required controls, for .NET Framework 4.6.2, .NET Core 2.0 and UWP. Integrates ...
Visual Basic .NET示例,来自MSDN。