third_party_content:community:commentary:revdevx:16451.2505671296

Special FX - Aero Glass

Published 14 JAN 2013 at 06:00:49AM

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.  The GLASSMARGINS 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).

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):

[caption id="attachment_605" align="aligncenter" width="448"] Fake Glass under Aero Basic[/caption]

[caption id="attachment_607" align="aligncenter" width="470"] Fake Glass under Windows XP[/caption]

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:

[caption id="attachment_612" align="aligncenter" width="452"] Fake Glass under Windows 8[/caption]

(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).

Comments

Original ID: revdevx.wordpress.com/?p=400
  • third_party_content/community/commentary/revdevx/16451.2505671296.txt
  • Last modified: 2024/01/29 20:23
  • by 127.0.0.1