Delphi .NET (2) Database (71) Delphi IDE (89) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
|
Dragging components at run-time
This article has not been rated yet. After reading, feel free to leave comments and rate it.
This piece of code shows how to drag a TPanel component Panel1 at run-time:  | |  | | procedure Form1.MouseDown(Sender: Tobject;
Button: TMouseButton;
Shift: TShiftState;
X, Y: Integer);
const
SC_DragMove = $F012;
begin
ReleaseCapture;
Panel1.Perform(WM_SysCommand, SC_DRAGMOVE, 0);
end; | |  | |  |
Comments:
|