One of the new capabilities added to OpenInsight 10 forms is Aero Glass support, a feature that Microsoft introduced with Windows Vista and unfortunately removed in Windows 8 (in the interests of disclosure your author is not a great fan of the “improvements” to the desktop in Windows 8). Still, Windows 7 remains extremely popular and will be around for many years to come so it makes sense to provide an Aero Glass interface for developers who wish to use it.
Aero Glass is exposed via the following properties:
- GLASSMARGINS
- GLASSFRAME
- GLASSDRAG
The GLASSMARGINS property
This property is a simple @fm-delimited dynamic array of margin values that specify the areas on the form that should be rendered using the glass effect. Basically everything between the edge of a form and it’s appropriate margin value is rendered as glass.
<1> Left Margin <2> Right Margin <3> Top Margin <4> Bottom Margin
Note that setting the margins to “-1” forces the entire client area of the form to be rendered as glass instead.
The GLASSFRAME property
This is a boolean property (1/0) that enables or disables the Aero Glass effect for a form. TheGLASSMARGINS property must have been set before this property can be used to enable glass rendering.
The GLASSDRAG property
This is a boolean property (1/0) that specifies if the glass areas of a form can be used for dragging (normally only the form caption area can be used for this).
What happens when Aero Glass is not available?
Of course it’s entirely possible that your application may have to run in an environment where Aero Glass is not available, such as running under the Aero Basic theme or on Windows XP. In these circumstances the OS would “give up” and your form would be rendered with a normal client area like so:
As you can see there’s no hint of the glass margins, so this will probably make your glass-based UI layout unsatisfactory. In this case we’ve gone one step further and implemented a “Fake Glass” effect (much like Windows Explorer does under Aero Basic):
Of course, as Microsoft removed Aero Glass in Windows 8 they actually supply their own replacement, which simply paints the solid frame colors into the “glass” margins like so:
(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).