.NET System Information Class Demo

Category:
C#, VB.NET, ASP.NET
Type:
Classes
Difficulty:
Beginning
Author:
Intelligent Solutions Inc.

Version Compatibility: Visual Basic.NET, ASP.NET

More information:
This class encapsulates the .NET system information class, which allows you to easily get information about the system your process is running on. It only uses a subset of the SystemInformation class; you can look in help or use intellisense (SystemInformation.) to get an idea of what else this it can do. To quickly see what information you can get from the class presented here, run the following in the IDE:
 Dim objSysInfo As New clsSystemInfo()
        With objSysInfo
         Debug.WriteLine("Boot Mode: " & .BootMode)
         Debug.WriteLine("Computer Name: " & .ComputerName)
         Debug.WriteLine("Double Byte Character Set Enabled: " _
               & .DBCSEnabled)
         Debug.WriteLine("Network Connection Present: " & .isConnectedToNetwork)
         Debug.WriteLine("Menu Font Name: " & .MenuFontName)
         Debug.WriteLine("Menu Font Name: " & .MenuFontSize)
         Debug.WriteLine("Menu Height: " & .MenuHeight)
         Debug.WriteLine("Hebrew and Arabic supported: " & .MidEastEnabled)
         Debug.WriteLine("# of attached monitors: " & .MonitorCount)
         Debug.WriteLine("Is mouse  present: " & .MousePresent)
         Debug.WriteLine("Is mouse wheel present: " & .MouseWheelPresent)
         Debug.WriteLine("# of mouse buttons: " & .MouseButtons)
         Debug.WriteLine("Is Pen Windows Supported: " & .PenWindows)
         Debug.WriteLine("Primary Monitor Size: " & .PrimaryMonitorSize)
         Debug.WriteLine("Is OS Security Present:" & .Secure)
         Debug.WriteLine("Domain Name: " & .UserDomainName)
         Debug.WriteLine("User Name: " & .UserName)
         Debug.WriteLine("Current process running in user interactive mode:" & .UserInteractive)
         Debug.WriteLine("Working Area: " & .WorkingArea)

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: