I have not looked at your code but I can offer this, if you are changing the size of the control during the
OnSize handler, it will keep looping..
Let us know if that is what you are doing ?
The OnSize event is to report size status after the event, not before.
P.S.
I did ask for the implementation of OnSizing but that pretty much got tossed out the door, so
I implemented the WM_SIZING message so I could make for corrections before the values actually
got past to the LCL code. After that I was able to capture the form sizing events and change their values
before they actually took effect, which gave my app a very smooth aspect ratio sizing without flickering.