Click or drag to resize

GlassExtendFrameIntoClientArea Method

Extends the glass window frame into the client area of the specified window.

Namespace:  Ookii.Dialogs
Assembly:  Ookii.Dialogs (in Ookii.Dialogs.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static void ExtendFrameIntoClientArea(
	this IWin32Window window,
	Padding glassMargin
)

Parameters

window
Type: System.Windows.FormsIWin32Window
The IWin32Window on which to enable client area glass.
glassMargin
Type: System.Windows.FormsPadding
The the margins to use when extending the frame into the client area.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IWin32Window. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionwindow is .
NotSupportedExceptionThe current operating system does not support glass, or the Desktop Window Manager is not enabled.
Remarks

Use negative margins to create the "sheet of glass" effect where the client area is rendered as a completely glass surface.

The glass area must be filled with either a black brush or the TransparencyKey color in order to display correctly. If the TransparencyKey method is used, clicks in the glass area will "fall through" the window to the window below it. If the black brush method is used, text rendered with the TextRenderer will not display correctly on the glass area (this includes text drawn by most controls). To draw text on the glass area, use DrawCompositedText(IDeviceContext, String, Font, Rectangle, Padding, Color, Int32, TextFormatFlags).

This method needs to be called again if the state of the Desktop Window Manager is toggled.

See Also