To run a macro when the Resize event occurs, set the OnResize property to the name of the macro.
To repaint the screen every time a form is resized, use the RepaintObject action in the macro you specify for the Resize event.
You can’t use the CancelEvent action in a Resize macro.
Resize Event — Event Procedures.