BackgroundColor property (WinStudio scripts)
Applies To
IWSForm interface
IWSFormComponent interface
Definition
Sets or returns the background color of a form or component.
Syntax
object.BackgroundColor
Part | Description |
---|---|
object | Required. A reference to a form object or form component object. |
Remarks
The background "color" can be either:
- A single, solid color, with or without transparency
- A pair of colors used for a linear gradient, with each color having its own color and transparency settings
For additional syntax to use with this property, see “BACKCOLOR Keyword”
This property corresponds to the Background Color setting in the Form Properties or Component Properties sheets.
Examples
ThisForm.BackgroundColor = "TYPE=1; ARGB0=[255, 210, 239, 109]; ARGB1=[128, 255, 255, 255]; DIRECTION=1;"
ThisForm.Components("button1").BackgroundColor = "V(gbgc_SampleColor1)"
Sub Main()
Application.ShowMessage("Current form background color = " & ThisForm.BackgroundColor _
& vbLf & "Current form foreground color = " & ThisForm.ForegroundColor)
ThisForm.BackgroundColor = "240,240,240"
ThisForm.ForegroundColor = "0,64,128"
Application.ShowMessage("Background color changed to = " & ThisForm.BackgroundColor _
& vbLf & "Foreground color changed to " & ThisForm.ForegroundColor)
End Sub