I’m building a custom control, and I need it to be able to respond when it gets resized. I need the old dimensions and the new dimensions available in order to do some calculations.
Unfortunately, the SetWidth and SetHeight methods are private to TControl, not protected, and so I can’t override them. Is there any other way to know that my control’s about to be resized, and to have the old size and the new size both available?
Override the SetBounds public method. It passes in the new size, and you can use the Width and Height properties to get the current width/height.