Making A Draggable Titlebar

Click to select the code.  Use Control-C to copy it to your clipboard. Help


Draggable titlebars of this kind are  most useful in cases where you have a form without a titlebar, but still need to be able to drag the form.  Use a Label and position and size it where you want the draggable 'hook' to be.  If you wish, set the Label as transparent, and leave the Caption empty; and remember to set the Label's Autosize as false.

In this example we show the attachment to a Label; however, the same technique may be applied to most controls with MouseMove and MouseDown events.  See also: Making a Draggable Form.


Copyright 2001 - 2012 by and OECCorp.
The 2012 Evolution™ is an OEC InterNET Group site.SupportNotices