IPane.BackgroundColor [Property][Get/Set]
- Last UpdatedFeb 27, 2024
- 1 minute read
Gets or Sets the color of this Pane.
Defined As
-
[VBA] Long BackgroundColor
-
[Cicode] INT BackgroundColor
-
[C++] OLE_COLOR BackgroundColor
Execution Result
If the property get/set succeeds, the return value will be Success. If the pane is deleted, the return value will be GeneralFailure.
Remarks
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 there is a valid Pane object to be passed into the example methods.
[VBA]
Sub Example(Pane As Object)
Dim backgroundColor As Long
`Getting Property value
backgroundColor = Pane.BackgroundColor
`Setting Property value to red
Pane.BackgroundColor = 255
End Sub
[Cicode]
FUNCTION Example(OBJECT hPane)
// Getting property value
INT nColor = _ObjectGetProperty(hPane, "BackgroundColor");
// Setting property value
_ObjectSetProperty(hPane, "BackgroundColor", 255);
END