Occurs when a form is first displayed or when the window size changes.
Object.OnResize()
The OnResize event syntax has the following parts:
Name |
Type |
Description |
Object |
AForm |
AForm object |
The OnResize event also occurs when a form window state; for example when the form is maximized, minimized, or restored.
Use a OnResize event procedure to move or resize controls when the parent form is resized. You can also use this event procedure to recalculate variables or properties, such as Top, Left, Height, Width, ScaleHeight and ScaleWidth, that may depend on the size of the form. If you want graphics to maintain sizes proportional to the form when it is resized, invoke the OnPaint event by using the Refresh method in a OnResize event procedure.
Whenever the AutoRedraw property is set to False and the form is resized, ATEasy also calls the related events, OnResize and OnPaint, in that order. When you attach procedures for these related events, be sure their actions do not conflict.
Procedure MyForm.OnResize(): Void Public
lTbrH:Long
lSbrH:Long
{
! size the log and status bar
lTbrH=tbr.Height
lSbrH=sbr.Height
logTestExec.Move(, lTbrH, ScaleWidth, ScaleHeight-lTbrH-lSbrH)
}
AutoRedraw, Height, OnMove, OnPaint, Refresh, ScaleHeight, ScaleMode, ScaleWidth, Width