Applies to: a Clarion 8 release, build 8658 named in the thread; ABC window procedures with a resizer.
Problem
EVENT:Sized fires many times for a single window resize. That slows dragging and breaks a custom resizing routine that works on controls created at run time. Putting the custom code at the EVENT:Sized embed point and at the Resizer.Resize() embed point gave the same result.
Solution
- Using EVENT:DoResize instead was suggested first; the poster tried it and saw the same result.
- What worked: do not react to the event itself. Watch for a change of the window size and respond to that, checking on pretty much every event in TakeWindowEvent. No subclassing of the window is needed.
- Read the size with GETPOSITION. It needs a single WINAPI call under the covers, better than reading PROP:Width and PROP:Height one by one.
- Another poster sketched the check:
GETPOSITION(0, xPos, yPos, Width, Height)
IF Width <> SaveWidth OR Height <> SaveHeight
SaveWidth = Width
SaveHeight = Height
DO Magic
END
The resize code then runs only when the size has changed, and is skipped until the next change.
Caveats
- The poster who gave the approach said he used it because resize events behave inconsistently across Clarion versions; this approach worked on all of them.
- The thread does not explain why EVENT:Sized repeats, or the difference between the Sized and DoResize equates.
Today (2026)
Likely still valid, since it uses plain window properties and not the event. Not re-tested.
Sources: Gustavo P. (Jul 2012, the question), Mike H., Gregory B. (Jul 2012) in sv.clarion.clarion8.