Image Map of Navigational Panel to Home / Contents / Search Adding Zing to your About Boxes

by Stephan Grieger - GUI Computing

Image of line

Nearly all of Microsoft’s About boxes contain system information such as free resources, free space etc. While not very relevant to the average user, programmers still like to place this little functionality into their own boxes.

If you want to include the same functionality into your own About boxes, there are two API functions needed.

  Declare Function GetFreeSpace& Lib "Kernel" (ByVal wFlags%)
  Declare Function GetFreeSystemResources% Lib "User" (ByVal fuSysResource%)

In the function GetFreeSpace&, wFlags% needs to be set to zero.

fuSysResource% in the GetFreeSystemResources function, can have one of three values.

GFSR_SystemResources = 0 Returns the percentage of free system resources.
GFSR_GDIResources = 1 Returns the percentage of free space for GDI objects. These include display contexts, drawing objects, regions and fonts.
GFSR_UserResources = 2 Returns the percentage of free space for USER objects. These include windows and menus.

Unfortunately you cannot OR the values to obtain, for example, total GDI and USER resources available. You will need to run the function three times to obtain the three values.

Written by: Stephan Grieger
June 94

Image of arrow linked to next page
Image of line