Collect and Display Information on the System and the Access Installation

Problem

Your application really needs to know some information about the computer on which it’s running. In addition, you’d like to add some professional polish and an About... box that shows information about the computer, the resources, and the user. Access doesn’t provide any way to find this information. How can you gather it?

Solution

You can use the Windows API to retrieve information about the system on which your program is running. By using these various functions as the control sources for unbound controls, you can present a selection of system information to your user.

Load 11-13.MDB and open frmSystemInfo in regular form view (see Figure 11-15). This form includes five “pages” of information about the current computer and its resources. If you like the look of this form, use it as-is in your own applications. (You’ll need to import the form, frmSystemInfo, its subform, fsubInfo, and the module, basSystemInfo, into your application, as directed in Step 1.)

frmSystemInfo shows memory status information

Figure 11-15. frmSystemInfo shows memory status information

To create a similar form in your own application, follow these steps:

  1. Import the module basSystemInfo from 11-13.MDB into your own application. This module contains all the constants, API declarations, and wrapper functions that you’ll need.

  2. Create a new form. Place an unbound text box ...

Get Access Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.