Desktop client area size is still wrong!

agraham

Expert
Licensed User
Longtime User
On the desktop, both in the IDE and when compiled, the client area size is wrong because CEnhancedForm still assumes fixed frame size values when setting the form Maximum and Minimum size rather than specifying the actual Form size. Also the value of b4p.screenX is off by 2. For a standard size form it is being set to 238 and not 240.

it presently does

this.ClientSize = new System.Drawing.Size(b4p.screenX, b4p.screenY);
this.MaximumSize = new System.Drawing.Size(b4p.screenX + 7, b4p.screenY + 34);
this.MinimumSize = this.MaximumSize;

instead of

this.ClientSize = new System.Drawing.Size(b4p.screenX, b4p.screenY);
this.MaximumSize = this.Size;
this.MinimumSize = this.MaximumSize;


Also in the Designer the Height and Width boxes for a Form display fixed values regardless of form size and the height is wrong anyway. Assuming they are supposed to be client area sizes the I think the height should be 268 not 264.
 
Top