Copyright © 1998-2010 MultiMedia Soft

BackColorContainer property

Previous pageReturn to chapter overviewNext page


OLE_COLOR for Visual C++

long for Visual Basic




object.BackColorContainer [=long]




The container background color.

This property can reduce the aliasing effect that appears when using rounded shapes: the anti-aliasing effect is obtained by averaging the button borders with the container background color.

If you leave this property to undefined (-1), the control will try to determine the container background color, but it may not always guess correctly. Usually it is not necessary to set this property when the project has been developed using Visual Basic.

NOTE 1: Some ActiveX control container (such as Microsoft Visual Fox Pro) do not support correctly non-rectangular controls, so the control bounding rectangle is not painted and has an undetermined color: use this property to force the painting of the bounding rectangle at run-time.

NOTE 2: The behaviour of Microsoft Access is still different and requires the call of the SetNSContainerColor in order to get rid of the problem.

NOTE 3: If you need to set a pure black background color, avoid using the RGB (0, 0, 0) setting (corresponding to a decimal value 0); due to an internal meaning of the value 0 associated to a color, you should set this property value to 1: the very slight difference won't be perceived by the human eye.