Contents - Index - Top


DefaultBackgroundColor

Interface AntView 

 

Type: Property

Access: Read/Write

Data Type: OLE_COLOR

 

 

With this property you can get/set the background color of the control.

To see this color you either need to not load a document in the control, or load a document which has a transparent background set in the html.

 

The default value is white.

The color itself is RGB based, where the OLE_COLOR data type is 4 bytes of which the 3 least significant bytes are used.

The color is coded as B(lue)G(reen)R(ed), where red is the least significant byte.

If you assign 255 to this property, the background will end up as bright red.

This is how color settings tend to work in most development environments, so if there's predefined color constants, you can probably use them here.

 

In some development environments setting the background color works well in a light windows theme, but changing the windows theme to dark shows a background of black (for example DataFlex and VB6)

Other development environments, such as Visual Fox Pro, set the background color as expected - even with a dark windows theme.

 

If your your development environment has a problem with setting the color for a dark windows theme, then the workaround is to tell the AntView control to apply a light theme to the control itself.

 

For example in VB6, the following works:

 

Private Sub EdgeWebBrowser_OnCreateWebviewCompleted(ByVal HResult As Long)

  

  EdgeWebBrowser.Profile.ColorScheme = pcsLight

  EdgeWebBrowser.DefaultBackgroundColor = 255

 

This results in the AntView control to show a bright red background in both light as well as dark Windows themes.

 

Introduced in AntView release 2.0.629

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 2026/07/13