Quick Find: Search for:

 Total Access Components
Control Tour

Return to Components Home
 

 
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

About Box

AVI (Video)

Bitmap Effects

Border
Browse for Folder New!
CD Player
Clipboard
Clock
Common Dialogs
Date Time Picker New!
Digital Display
Enhanced Button
Gauge
Icon Menu
INI File
Marquee
Notes
Popup Menu
Progress Meter
Registry
Resize
Slider
Spin Button
Splitter
System Info
Tab Strip
Text Effects
Timer
Wave
 

 

Total Access Components Tour: System Information

The System Information Control is a non-display control that makes it easy to retrieve computer and network specific information. You can place a control on a form and use its properties and methods to get information without using complicated Windows API calls. Additionally, the System Information Control provides information that is not available through the Windows API.

Using the System Information Control

The System Information control does not have any design time properties that you can set. Everything is retrieved through methods.

Identifying Drive Letters

Several of this control’s methods require the DriveLetter parameter. This parameter identifies the number of the drive for which you want information. This number is 0-based, meaning that the first drive on your system is drive 0. 

You can use these methods to determine the drives on your system. You should enumerate through all 26 numbers and check the return value. If you refer to an invalid drive number, the method you called triggers a VBA runtime error. Trap for the error and use the error condition to identify an invalid drive.

System Information Properties

Name

Description

CapsLock

The status of the Caps Lock key.

ComputerName

The network computer name.

CPUType

The CPU type.

FreeMem

The total free memory, in bytes.

MathCo

The presence of a math coprocessor.

NumLock

The status of the Num Lock key.

SystemDir

The path and name of the Windows System directory.

TempDir

The path and name of the temporary directory.

TempFileName

The path and name of a temporary file.

UserName

The network user name.

WindowsDir

The path and name of the Windows directory.

WindowsType

The Windows type.

WindowsVersion

The Windows version.

System Information Methods

Name

Description

GetDiskType

Returns the type of the specified drive.

GetDiskVolume

Returns the volume of the specified drive.

GetFileExt

Returns the file extension.

GetFileName

Returns the filename portion of the path.

GetFilePath

Returns the path without the filename or extension.

GetFileVersion

Returns the version of the specified file.

GetFreeDiskSpace

Returns the amount of free disk space on the specified drive.

Questions  l   Web questions: Webmaster   l   Copyright © 2008 FMS, Inc.

Celebrating 21 Years of Software Excellence