The property Heightincludes the height of the title bar of the window, so the client area (the one limited by the buttons) is smaller than you expect.
It works:
this.ClientSize = new Size(this.ClientSize.Width,
this.buttonOK.Bounds.Bottom + SomePadding);
I did not find the property ClientHeight, can this be done easier?
Timbo source
share