Description
Sets glass effects to color button.
Syntax
Ctlname.SetGlassIndicator (tagGlassThemeColor NormalGlass, tagGlassThemeColor MouseOveredGlass, tagGlassThemeColor MouseDownGlass, tagGlassThemeColor DroppedDownGlass)
Return Type
Boolean
Remarks
Use this method to set the color button glass effects with some button status while are normal, mouse over, mouse down and dropped popup window visible.
This method is available only for Office style.
These drawing effects will cover all background color and background picture.
“Glass effects” are an appearance like glass combined two gradient colors, programmers can design and combine them freely, as following:
Normal |
Mouse Over | Mouse Down | Dropped popup window visible |

About tagGlassThemeColor structure, describes as following:
typedef struct tagGlassThemeColor
{
Long lTopStart;
Long lTopEnd;
Long lBottomStart;
Long lBottomEnd;
Long lReserved1;
Long lReserved2;
Long lReserved3;
Long lReserved4;
Long lReserved5;
} GlassThemeColor, *LPGLASSTHEMECOLOR;
This structure applies as following:
tagGlassThemeColor |
Description |
Office 2000 |
Office 2003 |
Office 2007 |
| Normal | ||||
| Long lTopStart | Top Start Color | ● |
● |
● |
| Long lTopEnd | Top End Color | ● |
● |
● |
| Long lBottomStart | Bottom Start Color | ● |
● |
● |
| Long lBottomEnd | Bottom End Color | ● |
● |
● |
| Long lReserved1 | Border Color | ● |
||
| Long lReserved2 | Reserved | |||
| Long lReserved3 | Reserved | |||
| Long lReserved4 | Reserved | |||
| Long lReserved5 | Reserved | |||
| Mouse Over | ||||
| Long lTopStart | Top Start Color | ● |
● |
● |
| Long lTopEnd | Top End Color | ● |
● |
● |
| Long lBottomStart | Bottom Start Color | ● |
● |
● |
| Long lBottomEnd | Bottom End Color | ● |
● |
● |
| Long lReserved1 | Mid-Bottom Color | ● |
||
| Long lReserved2 | Reserved | |||
| Long lReserved3 | Reserved | |||
| Long lReserved4 | Border Color | ● |
● |
● |
| Long lReserved5 | Reserved | |||
| Mouse Down | ||||
| Long lTopStart | Top Start Color | ● |
● |
● |
| Long lTopEnd | Top End Color | ● |
● |
● |
| Long lBottomStart | Bottom Start Color | ● |
● |
● |
| Long lBottomEnd | Bottom End Color | ● |
● |
● |
| Long lReserved1 | Mid-Bottom Color | ● |
||
| Long lReserved2 | Bottom Start Color(Mouse Down) | ● |
||
| Long lReserved3 | Bottom End Color(Mouse Down) | ● |
||
| Long lReserved4 | Border Color | ● |
● |
● |
| Long lReserved5 | Reserved | |||
| Popup Window is Visible | ||||
| Long lTopStart | Top Start Color | ● |
● |
● |
| Long lTopEnd | Top End Color | ● |
● |
● |
| Long lBottomStart | Bottom Start Color | ● |
● |
● |
| Long lBottomEnd | Bottom End Color | ● |
● |
● |
| Long lReserved1 | Half Right Top Start Color | ● |
||
| Long lReserved2 | Half Right Top End Color | ● |
||
| Long lReserved3 | Half Right Bottom Start Color | ● |
||
| Long lReserved4 | Half-Right Bottom End Color | ● |
||
| Long lReserved5 | Border Color | ● |
||
Samples
Dim glass(3) As tagGlassThemeColor
'Normal
glass(0).lTopStart = RGB(255, 248, 202)
glass(0).lTopEnd = RGB(255, 21, 154)
glass(0).lBottomStart = RGB(245, 67, 160)
glass(0).lBottomEnd = RGB(255, 238, 186)
'Mouse Over
glass(1).lTopStart = RGB(2, 248, 202)
glass(1).lTopEnd = RGB(2, 235, 154)
glass(1).lBottomStart = RGB(2, 218, 84)
glass(1).lBottomEnd = RGB(2, 239, 186)
glass(1).lReserved1 = RGB(255, 255, 255)
'Mouse Down
glass(2).lTopStart = RGB(255, 33, 202)
glass(2).lTopEnd = RGB(255, 33, 154)
glass(2).lBottomStart = RGB(255, 33, 84)
glass(2).lBottomEnd = RGB(255, 33, 186)
glass(2).lReserved1 = RGB(255, 255, 255)
glass(2).lReserved2 = RGB(129, 233, 3)
glass(2).lReserved3 = RGB(21, 123, 128)
'Drop down
glass(3).lTopStart = RGB(255, 248, 12)
glass(3).lTopEnd = RGB(120, 123, 255)
glass(3).lBottomStart = RGB(110, 110, 230)
glass(3).lBottomEnd = RGB(0, 239, 112)
glass(3).lReserved1 = RGB(255, 0, 12)
glass(3).lReserved2 = RGB(0, 248, 12)
glass(3).lReserved3 = RGB(167, 221, 112)
glass(3).lReserved4 = RGB(12, 167, 1)
glass(3).lReserved5 = RGB(0, 132, 222)
ColorChooser1.SetGlassIndicator glass(0), glass(1), glass(2), glass(3)
ColorChooser1.SetGlassCustomButton glass(1), glass(2)
The result is following:
Normal |
Mouse Over | Mouse Down | Dropped popup window visible |
![]() |
![]() |
|
| Normal | Mouse Over |