Overview

"LayerForm" is a package of five unique components that will allow projects to decorate beautiful shapes (for example, the shape of «About»). The idea of the package - the use of 32 bit graphics to replace the standard form and the type of image. The package is easy to use and the use of an alpha channel and apply effects unique morphing give your forms.


Features


Installation

Download and unrar. In the menu Delphi, select "Component" -> "Install Packages ..." dialog box, click "Add" and select the file "LayerForm.bpl" from the archive. Select the menu "Tool" -> "Environment Options ..." in the tab "Library" to add the path to the file in the "Library Path".


Support

support@layerform.net


TLayerForm

TComponent> TCustomLayerForm>TLayerForm

Methods

# | Name | Description
1 | Minimize | procedure initiates folding windows on the desktop Syntax: Minimize;
2 | MinimizeToTray | pprocedure initiates window swerving in the Tray area Syntax: MinimizeToTray;
3 | Normalize | pprocedure initiates window restoration Syntax: Normalize;

Properties

# | Name | Description
1 | AlphaValue | Value defines a level of transparency of a window Syntax: lphaValue: Byte;
2 | CurrentControl | The active element (is defined by cursor finding over an element) Syntax: CurrentControl: TCustomLayerControl;
3 | FormMinimizedState | Value defines the provision of the form when swerving form on a desktop Syntax: ormMinimizedState: TFormState; TFormState = (fsLeft, fsLeftTop, fsTop, fsTopRight, fsRight, fsRightBottom, fsBottom, fsBottomLeft, fsCenter, fsDefault);
4 | FormNormalState | Value defines the provision of the form in a normal state Syntax: ormNormalState: TFormState; TFormState = (fsLeft, fsLeftTop, fsTop, fsTopRight, fsRight, fsRightBottom, fsBottom, fsBottomLeft, fsCenter, fsDefault);
5 | Hint | The text over an icon in Tray Syntax: Hint: String;
6 | Icon | Icon which will be displayed in Tray Syntax: Icon: Icon;
7 | IconVisible | The test of an icon in Tray Syntax: conVisible: Boolean;
8 | ImageMinimize | The figure, которsq will be displayed when swerving form on a desktop Syntax: mageMinimize: TLayerImageIndex; TLayerImageIndex = type Integer;
9 | Images | Collection of figures Syntax: Images: TBitmaps32List;
10 | LayerState | Information on the form Syntax: ayerState: TLayerState; TLayerState = (lsNormal, lsMinimize, lsTray);
11 | Magnetic | Whether value is defined by the form will be attracted to screen edges Syntax: Magnetic: Boolean;
12 | MagneticSize | Value defines distance from which the form will be attracted Syntax: agneticSize: Integer;
13 | ShowHint | Whether value defines Hint will be shown Syntax: howHint: Boolean;
14 | OnChangeCurrentControl | The event arising in case of change of CurrentControl Syntax: nChangeCurrentControl: TNotifyEvent;
15 | OnClick | The event arising in case of a click on the form in a mode LayerState = by lsMinimize Syntax: nClick: TNotifyEvent;
16 | OnDblClick | The event arising in case of doubleclick on the form in a mode LayerState = lsMinimize Syntax: nClick: TNotifyEvent;


TBitmaps32List

TComponent> TBitmaps32List

Methods

# | Name | Description
1 | Assign | procedure copies the selected object Syntax: Assign(Source: TPersistent);

Properties

# | Name | Description
1 | Bitmap32 | Collection figure Syntax: Bitmap32[Index: Integer]: TBitmap32;
2 | Images | Collection Syntax: Images: TBitmap32Collection;
3 | OnChanged | The event arises in case of change of figures in a collection Syntax: OnChanged: TNotifyEvent;


TImageLayerControl

TGraphicControl> TCustomLayerControl> TCustomImageLayerControl>TImageLayerControl

Methods

# | Name | Description
1 | PopupAtCursor | procedure causes the pop up menu Syntax: PopupAtCursor;

Properties

# | Name | Description
1 | AlphaValue | Value defines a level of transparency of an element Syntax: AlphaValue: Byte;
2 | Bitmap32 | Current image of an element Syntax: Bitmap32: TBitmap32;
3 | DraggAble | Whether value defines it is possible to move the form, using this element Syntax: DraggAble: Boolean;
4 | Effect | The object, defines behavior of an element Syntax: Effect: TEffectImage;
5 | EnableAlpha | Value defines, whether the transparent pixels of Bitmap32 will be considered in case of determination of the active element Syntax: EnableAlpha: Boolean;
6 | Images | Collection of figures Syntax: Images: TBitmaps32List;
7 | ImageState | Value defines the provision of a figure in the field of an element Syntax: ImageState: TImageState; TImageState = (isLeft, isLeftTop, isTop, isTopRight, isRight, isRightBottom, isBottom, isBottomLeft, isCenter);
8 | LayerForm | TLayerForm value on the form Syntax: LayerForm: TCustomLayerForm;
9 | MouseOverControl | Indication of finding of the cursor of a mouse over an element Syntax: MouseOverControl: Boolean;
10 | PopupMenu | TPopupMenu value for the pop up menu Syntax: PopupMenu: TPopupMenu;
11 | OnMouseEnter | The event arises in case of induction of the cursor of a mouse on an element Syntax: OnMouseEnter: TNotifyEvent;
12 | OnMouseLeave | The event arises in case of escape by the cursor of a mouse of an element Syntax: OnMouseLeave: TNotifyEvent;


TEffectButtonLayerControl

TGraphicControl> TCustomLayerControl>TCustomButtonLayerControl> TCustomEffectButtonLayerControl> TEffectButtonLayerControl

Methods

# | Name | Description
1 | PopupAtCursor | procedure causes the pop up menu Syntax: PopupAtCursor;

Properties

# | Name | Description
1 | AlphaValue | Value defines a level of transparency of an element Syntax: AlphaValue: Byte;
2 | Bitmap32 | Current image of an element Syntax: Bitmap32: TBitmap32;
3 | ButtonLayerState | Indication of a current status of an element Syntax: ButtonLayerState: TButtonLayerState; TButtonLayerState = (blsNormal, blsDown, blsOver);
4 | DownSize | Value defines offset of a figure of ButtonLayerState = blsDown Syntax: DownSize: Integer;
5 | DownStyle | Value defines the direction of offset of a figure of ButtonLayerState = blsDown Syntax: DownStyle: TImageState; TImageState = (isLeft, isLeftTop, isTop, isTopRight, isRight, isRightBottom, isBottom, isBottomLeft, isCenter);
6 | DraggAble | Whether value defines it is possible to move the form, using this element Syntax: DraggAble: Boolean;
7 | Effect | The object, defines behavior of an element Syntax: Effect: TEffectButton;
8 | EnableAlpha | Value defines, whether the transparent pixels of Bitmap32 will be considered in case of determination of the active element Syntax: EnableAlpha: Boolean;
9 | Images | Collection of figures Syntax: Images: TBitmaps32List;
10 | ImageState | Value defines the provision of a figure in the field of an element Syntax: ImageState: TImageState; TImageState = (isLeft, isLeftTop, isTop, isTopRight, isRight, isRightBottom, isBottom, isBottomLeft, isCenter);
11 | LayerForm | TLayerForm value on the form Syntax: LayerForm: TCustomLayerForm;
12 | MouseOverControl | Indication of finding of the cursor of a mouse over an element Syntax: MouseOverControl: Boolean;
13 | PopupMenu | TPopupMenu value for the pop up menu Syntax: PopupMenu: TPopupMenu;
14 | OnMouseEnter | The event arises in case of induction of the cursor of a mouse on an element Syntax: OnMouseEnter: TNotifyEvent;
15 | OnMouseLeave | The event arises in case of escape by the cursor of a mouse of an element Syntax: OnMouseLeave: TNotifyEvent;


TStretchButtonLayerControl

TGraphicControl> TCustomLayerControl>TCustomButtonLayerControl> TCustomStretchButtonLayerControl> TStretchButtonLayerControl

Methods

# | Name | Description
1 | PopupAtCursor | procedure causes the pop up menu Syntax: PopupAtCursor;

Properties

# | Name | Description
1 | AlphaValue | Value defines a level of transparency of an element Syntax: AlphaValue: Byte;
2 | Bitmap32 | Current image of an element Syntax: Bitmap32: TBitmap32;
3 | ButtonLayerState | Indication of a current status of an element Syntax: ButtonLayerState: TButtonLayerState; TButtonLayerState = (blsNormal, blsDown, blsOver);
4 | DownSize | Value defines offset of a figure of ButtonLayerState = blsDown Syntax: DownSize: Integer;
5 | DownStyle | Value defines the direction of offset of a figure of ButtonLayerState = blsDown Syntax: DownStyle: TImageState; TImageState = (isLeft, isLeftTop, isTop, isTopRight, isRight, isRightBottom, isBottom, isBottomLeft, isCenter);
6 | DraggAble | Whether value defines it is possible to move the form, using this element Syntax: DraggAble: Boolean;
7 | Effect | The object, defines behavior of an element Syntax: Effect: TStretchButton;
8 | EnableAlpha | Value defines, whether the transparent pixels of Bitmap32 will be considered in case of determination of the active element Syntax: EnableAlpha: Boolean;
9 | Images | Collection of figures Syntax: Images: TBitmaps32List;
10 | ImageState | Value defines the provision of a figure in the field of an element Syntax: ImageState: TImageState; TImageState = (isLeft, isLeftTop, isTop, isTopRight, isRight, isRightBottom, isBottom, isBottomLeft, isCenter);
11 | LayerForm | TLayerForm value on the form Syntax: LayerForm: TCustomLayerForm;
12 | MouseOverControl | Indication of finding of the cursor of a mouse over an element Syntax: MouseOverControl: Boolean;
13 | PopupMenu | TPopupMenu value for the pop up menu Syntax: PopupMenu: TPopupMenu;
14 | OnMouseEnter | The event arises in case of induction of the cursor of a mouse on an element Syntax: OnMouseEnter: TNotifyEvent;
15 | OnMouseLeave | The event arises in case of escape by the cursor of a mouse of an element Syntax: OnMouseLeave: TNotifyEvent;


TEffectImage

TPersistent>TEffectPersistent> TEffectImage

Methods

# | Name | Description
1 | Assign | procedure copies the selected object Syntax: Assign(Source: TPersistent);

Properties

# | Name | Description
1 | CustomLayerControl | Indication of an element of the parent Syntax: CustomLayerControl: TCustomLayerControl;
2 | Effect | Value defines, whether the effect will be used in case of figure change Syntax: Effect: Boolean;
3 | EffectCoherently | Value defines, whether figures will change sequentially Syntax: EffectCoherently: Boolean;
4 | EffectStep | Value defines, for what quantity of steps images shall be replaced Syntax: EffectStep: Byte;
5 | EffectStyle | Value defines type of effect of change of images Syntax: EffectStyle: TEffectStyle; TEffectStyle = (efLine, efSin, efCos);
6 | Image | Figure number from a collection Syntax: Image: TLayerImageIndex; TLayerImageIndex = type Integer;


TEffectButton

TPersistent>TEffectPersistent> TEffectButton

Methods

# | Name | Description
1 | Assign | procedure copies the selected object Syntax: Assign(Source: TPersistent);

Properties

# | Name | Description
1 | CustomLayerControl | Display of parent element Syntax: CustomLayerControl: TCustomLayerControl;
2 | EffectCoherently | Value defines, whether figures will change sequentially Syntax: EffectCoherently: Boolean;
3 | EffectStep | Value defines, for what quantity of steps images shall be replaced Syntax: EffectStep: Byte;
4 | EffectStyle | Value defines type of effect of change of images Syntax: EffectStyle: TEffectStyle; TEffectStyle = (efLine, efSin, efCos);
5 | EffectNormalToOver | Value defines, whether the effect will be used in case of ButtonLayerState change Syntax: EffectNormalToOver: Boolean;
6 | EffectOverToDown | Value defines, whether the effect will be used in case of ButtonLayerState change Syntax: EffectOverToDown: Boolean;
7 | EffectOverToNormal | Value defines, whether the effect will be used in case of ButtonLayerState change Syntax: EffectOverToNormal: Boolean;
8 | EffectDownToOver | Value defines, whether the effect will be used in case of ButtonLayerState change Syntax: EffectDownToOver: Boolean;
9 | EffectDownToNormal | Value defines, whether the effect will be used in case of ButtonLayerState change Syntax: EffectDownToNormal: Boolean;
10 | ImageDown | Figure number from a collection for ButtonLayerState = blsDown Syntax: Image: TLayerImageIndex; TLayerImageIndex = type Integer;
11 | ImageNormal | Figure number from a collection for ButtonLayerState = blsNormal Syntax: Image: TLayerImageIndex; TLayerImageIndex = type Integer;
12 | ImageDisabled | Figure number from a collection for Enabled = False Syntax: Image: TLayerImageIndex; TLayerImageIndex = type Integer;
13 | ImageOver | Figure number from a collection for ButtonLayerState = blsOver Syntax: Image: TLayerImageIndex; TLayerImageIndex = type Integer;


TStretchButton

TPersistent>TEffectPersistent> TStretchButton

Methods

# | Name | Description
1 | Assign | procedure copies the selected object Syntax: Assign(Source: TPersistent);

Properties

# | Name | Description
1 | CustomLayerControl | Display of parent element Syntax: CustomLayerControl: TCustomLayerControl;
2 | EffectCountStep | Value defines, for what quantity of steps images shall be replaced Syntax: EffectCountStep: Byte;
3 | ImageDisabled | Figure number from a collection for Enabled = False yntax: ImageDisabled: TLayerImageIndex; TLayerImageIndex = type Integer;
4 | Image | Figure number from a collection Syntax: Image: TLayerImageIndex; TLayerImageIndex = type Integer;
5 | InterpolationStyle | Value defines interpolation type Syntax: InterpolationStyle: TInterpolationStyle; TInterpolationStyle = (isInterpolationModeInvalid, isInterpolationModeDefault, isInterpolationModeLowQuality, isInterpolationModeHighQuality, InterpolationModeBilinear, InterpolationModeBicubic, InterpolationModeNearestNeighbor, isInterpolationModeHighQualityBilinear, isInterpolationModeHighQualityBicubic);
6 | SmoothingStyle | Value defines smoothing type Syntax: SmoothingStyle: TSmoothingStyle; TSmoothingStyle = (ssSmoothingModeInvalid, ssSmoothingModeDefault, ssSmoothingModeHighSpeed, ssSmoothingModeHighQuality, ssSmoothingModeNone, ssSmoothingModeAntiAlias);
7 | StretchDirection | Value defines the scaling direction Syntax: StretchDirection: TStretchDirection; TStretchDirection = (sdCenter, sdVertically, sdHorizontally);
8 | StretchDown | Value defines, on how many to scale a figure for ButtonLayerState = blsDown Syntax: StretchDown: Single;
9 | StretchNormal | Value defines, on how many to scale a figure for ButtonLayerState = blsNormal Syntax: StretchNormal: Single;
10 | StretchOver | Value defines, on how many to scale a figure for ButtonLayerState = blsOver Syntax: StretchOver: Single;


TBitmap32

TPersistent > TBitmap32

Methods

# | Name | Description
1 | Assign | procedure copies the selected object Syntax: Assign(Source: TPersistent);

Properties

# | Name | Description
1 | Alpha | Indication of transparency of pixel of a figure Syntax: Alpha[X, Y: Cardinal]: Boolean;
2 | Bitmap | Syntax: Bitmap: TBitmap;
3 | Size | Values of the Bitmap sizes Syntax: Size: TCSize; PCSize = ^TCSize; TCSize = packed record X: Cardinal; Y: Cardinal; end;
4 | OnChanged | The event arises in case of Bitmap change Syntax: EffectStep: Byte;


Where to start?

TLayerForm should be placed on the form. On the form, there is only one TLayerForm. In the properties of TForm better set BorderStyle - bsNone (this is necessary for the correct determine the size form). Then put on the form TBitmaps32List, these components may be several. The following picture extensions: *. Jpg; *. Jpeg; *. Bmp; *. Ico; *. Emf; *. Wmf; *. Png. Next on the form is posted TImageLayerControl, TEffectButtonLayerControl. In these components, you must specify the properties LayerForm placed before the form TLayerForm, in properties Images - right TBitmaps32List.