formmagnet TacFormMagnet component
Hierarchy Properties Methods Events
Return to Introduction  Previous page  Next page
The acFormMagnet allows to magnetize your forms to an edges of screen / work area, borders of parent window and to other forms. Forms can be attached each to others, so when user moves the form, others, "glued" forms will be moved too. With acFormMagnet, your forms can looks and feels like windows of famous WinAmp player.  

With acFormMagnet forms obtains following abilities: be attracted to edges of screen or work area (considering placement of task / appbars) be attracted to borders of parent form (for child windows). attract other forms (with acFormMagnet on them) to itself. glue other forms to itself (when user move form, others, "glued" forms will be moved too) move forms, dragging by client area.  

Key properties
Activeactivity flag. Means that this window can be magnetized to other forms and to screen edges;  
FormDragableallows to move forms, dragging by client area;  
FormTopmostcontrols Z-order of form and allow the form to stay on top over other windows;  
Glueenables or disables gluing feature. When Glue is True and user moves the form, others, attached forms will be moved too;  
Optionsspecifies the behavior of the magnet (type of magnetization and gluing);  
Powermaximum range (in screen pixels) to other object that attract the form;  
ScreenMagnetlist of properties that allow the form to be magnetized to the screen edges.  
key events
OnDragMoveoccurs when form changes the screen position;  
OnGlueoccurs when form is about to be glued to other magnet;  
OnMagnetoccurs when form is about to be magnetized to other magnet.  

How to use ?
Just drop component onto your form, compile the program and try to move form near the screen edges. See description of properties for customization.