Using the Process Analyst > Process Analyst for Developers > Automation Model > IObjectView.ForeColor [Property][Get/Set]

IObjectView.ForeColor [Property][Get/Set]

Gets or Sets the Fore color (text and color box outlines) of the ObjectView. This number is treated as an OLE_COLOR inside the Process Analyst.

Defined As

Execution Result

If the property get succeeds, the return value will be Success. If the return variable is bad, the return value will be InvalidArgument.


The color value can be calculated using the following formula: color = (65536 * Blue) + (256 * Green) + (Red). Where red, green and blue are 0-255.

Calling Syntax

This example assumes that there is an IObjectView object being passed in as a parameter.


Sub Example(objectView As Object)
Dim foreColor As Long
`Getting Property value
foreColor = objectView.ForeColor
`Setting Property value to red
objectView.ForeColor = 255
End Sub


FUNCTION Example(OBJECT hObjectView)
INT nForeColor = 0;
// Getting property value
nForeColor = _ObjectGetProperty(hObjectView, "ForeColor");
// Setting Property to red
_ObjectSetProperty(hObjectView, "ForeColor", 255);