System Object

Provides access to system information such as the operating system, screen resolution, or registry.
Using the System Object
Use the System property to return the System object. The following statement returns the name of the calling application.
mySysApp = System.Application.Name
Use the Build and Version properties to return build and version information about the operating system.
myVer = System.Version
myBld = System.Build
The horizontal and vertical resolution can be used to determine if a graphic can be displayed on a client’s machine. The following statements return the resolution settings.
currHorizRes = System.HorizontalResolution
currVertRes = System.Vertical.Resolution
Use the OperatingSystem property to return the name of the current operating system, as shown in the following statement.
thisOps = System.OperatingSystem
Use the Parent property to return the parent of the specified object. The following statement returns parent information for the System object.
Private Sub GetSystemParentInfo()
Dim mySys As System
Dim mySysUserName As String
Set mySys = System
With mySys
mySysUserName = .Parent.UserName
End With
End Sub
Use the LanguageDesignation property to return a three-letter abbreviation for the language used for the operating system. The following statement returns "enu" as the language designation abbreviation for the English (US) language.
currSystemLanguage = System.LanguageDesignation
Use the ProfileString property to return or set an entry in the Windows registry. If used without parameters, the ProfileString property defaults to the following key:
HKEY_CURRENT_USERS\Software\Microsoft\FrontPage
The parameters for the ProfileString property are:
- RegistrySection, where RegistrySection is a registry subtree such as HKEY_CURRENT_USER or HKEY_LOCAL_MACHINE.
- RegistryKey, where RegistryKey is the next level below the section or subtree with such key names as Software or Network.
The following example returns the Identifier for the CentralProcessor subkey.
Private Sub GetProfileString()
Dim mySys As System
Dim myRegSec As String
Dim myRegKeyInfo As String
Set mySys = System
myRegSec = _
"HKEY_LOCAL_MACHINE\Hardware\Description\System\CentralProcessor\0"
myRegKeyInfo = mySys.ProfileString(myRegSec, "Identifier")
End Sub