How to Detect the Start Move/Resize, Move and Stop Move/Resize events of a Form.
If you want to detect when a user starts resizing and moving a Delphi form, and when the move (or resize) operation is finished, you need to handle a few Windows messages.
The WM_ENTERSIZEMOVE message is sent once to a window when it enters the moving or sizing mode. The WM_EXITSIZEMOVE message is sent once to a window after it has exited the moving or sizing mode. While a form is being moved, the WM_MOVE message is sent to a window.
Here's an example (move this form and watch its title):
Possible new tip from
extra/Topelina Tips.odt
FormENTERSIZEMOVE
How to Detect the Start Move/Resize, Move and Stop Move/Resize events of a Form.
If you want to detect when a user starts resizing and moving a Delphi form, and when the move (or resize) operation is finished, you need to handle a few Windows messages.
The
WM_ENTERSIZEMOVE
message is sent once to a window when it enters the moving or sizing mode. TheWM_EXITSIZEMOVE
message is sent once to a window after it has exited the moving or sizing mode. While a form is being moved, theWM_MOVE
message is sent to a window.Here's an example (move this form and watch its title):