Type | Description | |||
Long | A Long expression that specifies the index of the layer that clips the entire control to. |
"I would like to put the control on a form, then make the form transparent so the control appears on the desktop with just the images contained in the layers visible. For example, take a clock example and make the control background and the form transparent, and you have a working clock widget."
The control support transparent form, or in other words, displaying the control's itself without its form behind. In order to make your eXGauge control to display a widget, ( no form behind or form transparent ), you need to use the following properties:
LayerClipTo property of the control, specifies the index of the layer that clips the entire control to. By default, the LayerClipTo property is -1, which indicates that no clipping is supported. So, one of the layers that composes your widget must be specified as the widget's background, and so, the entire view of the control is clipped to region defined by the clipping layer (LayerClipTo). The LayerClipTo property may refer to any layer, visible or hidden, which includes a picture or a clipping object ( Clip property ).
Layer.LayerClipToAlpha property of the Layer object, returns or sets a value that indicates the value of the alpha channel to be included in the LayerClipTo region. By default, the LayerClipToAlpha property is 0, which indicates that only pixels of the layer that has 0 on the alpha channel (transparent pixels) defines the transparent region, and so the clipping region. In other words, the value from 0 to LayerClipToAlpha defines transparent pixels, and the rest defines the opaque pixels to be included in the clipping region. So based on the layer's picture, you can change the LayerClipToAlpha property for a better look of your widget.
LayerClipToParent property of the control, indicates if the LayerClipTo method clips the control itself, parent or the owner of the control. By default, the LayerClipToParent property is exLayerUpdateControl, which indicates that the control's itself is clipped relative to its form that hosts it. Change the LayerClipToParent property to exLayerUpdateScreen, or exLayerUpdateParent, and so the clipping region is applied to its form/dialog/parent window.
The following VB sample defines the control as a widget:
With Gauge1 .LayerClipTo = 0 .LayerClipToParent = exLayerUpdateScreen End With
The sample defines the layer with the Index 0, as being the clipping layer. The setup installs the C:\Program Files\Exontrol\ExGauge\Sample\VB\Clock-Widget-Region that shows all these working.
The following screen shot shows the control on a transparent form:
The following screen shot shows the control on an opaque form: