Platform SDK: Performance Monitoring

SystemMonitor.ForeColor

Retrieves or sets the color of all of the text displayed in the System Monitor. This is an ambient read/write property.

Public Property ForeColor( ) as OLE_COLOR

Remarks

You can set ForeColor to either a palette (RGB) color or a predefined system color. By default, its value corresponds to the foreground color of the control's container.

To set ForeColor to a palette (RGB) color, either include the RGB function followed by an integer value for each of the color components (red, green, and blue), or specify the hexadecimal equivalent of the three color component values. For information on the RGB function and the values you can specify for the function, refer to the "Color Constants" and "RGB Function" sections in Visual Basic Help.

The valid range for an RGB color value is 0 to 16,777,215 (&HFFFFFF). The red, green, and blue components are each represented by a number between 0 and 255 (&HFF). If you are specifying a hexadecimal number, remember that the high byte in the range of RGB color values is 0. The lower 3 bytes, from the lowest-order byte to the highest-order, respectively determine the red, green, and blue component values.

To set ForeColor to a predefined system color, use a Visual Basic color constant. For information about these constants, refer to the "Color Constants" section of Visual Basic Help. The available system colors are defined by the user in the Control Panel—in the Appearance sheet of the Display Properties window.

Return Values

The OLE_COLOR data type for the color of the text used in the view for legend column names, labels, statistics, and grids. The OLE_COLOR data type holds color information for controls and their containers to use.

Example

Graph1.ForeColor=vbRed
Graph1.ForeColor=RGB(255,255,0)
Graph1.ForeColor=&HFF00FF
Graph1.ForeColor=vbDesktop

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Smonctrl.odl.

See Also

System Monitor Automation Interface Overview, System Monitor Automation Interface Properties