This document is archived and information here might be outdated.  Recommended version.


IGlobeControlDefault.BackColor Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Controls)  

IGlobeControlDefault.BackColor Property

Background color of the GlobeControl.

[Visual Basic .NET]
Public Property BackColor As Integer
[C#]
public int BackColor {get; set;}
[C++]
HRESULT get_BackColor(
  long* pclr
);
[C++]
HRESULT put_BackColor(
  long pclr
);
[C++]

Parameters pclr [out, retval] pclr is a parameter of type long pclr [in] pclr is a parameter of type long

Product Availability

Available with ArcGIS Engine.

Description

Returns or sets the Background Color of the GlobeControl. Internally the OLE_Color is stored as a long integer where the value may be calculated for any RGB combination as follows:

OLE_Color=(Red) + (Green * 256) + (Blue * 256 * 256)

Where Red, Green and Blue are Long Integers within the range 0 - 255.

To ensure the BackColor property overrides any background color set in a globe document, set the OverrideBackColor to true.

Errors Returned

1057 800a0421: The supplied color value is invalid

[C#]

When working directly with AxControls class use the BackColor property as follows:

axGlobeControl1.BackColor=System.Drawing.Color.Red;

When using the Controls interop assembly use the BackColor property as follows:

IGlobeControlDefault globeControl=(IGlobeControlDefault) axGlobeControl1.Object;
globeControl.BackColor=255;

[Visual Basic .NET]

When working directly with AxControls class use the BackColor property as follows:

AxMapControl1.BackColor=System.Drawing.Color.Red

When using the Controls interop assembly use the BackColor property as follows:

Dim globeControl As IGlobeControlDefault=AxGlobeControl1.Object
globeControl.BackColor=Convert.ToUInt32(255)

See Also

IGlobeControlDefault Interface