OnMove Event (AForm) |
v10 build 156c |
Occurs when a form is moved.
Object.OnMove()
The OnMove event syntax has the following parts:
Name |
Type |
Description |
Object |
AForm |
AForm object |
The OnMove event also occurs when a form initially created, WindowsState changes (maximize, minimize or restored), you call the Move method or the form is moved by the user by dragging it caption or using the control menu to move it using the keyboard. When the form is moved, you may see multiple calls to the event.
User the Form.Left and Form.Top to retrive the new position.
The following example updates the form caption with new position as the OnMove event received:
Procedure MyForm.OnMove(): Void Public
{
! size the log and status bar
Form.Caption="Left="+str(Form.Left)+" Top="+str(Form.Top)
}
Left, Move, OnResize, Top, WindowState