Form size

  • Thread starter Thread starter Rodrigo Ferreira
  • Start date Start date
R

Rodrigo Ferreira

In my project i create a form in runtime when i click in a button.

The problem consists in the form size. I put this lines:

frmCalculadora.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
frmCalculadora.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
frmCalculadora.ClientSize = new System.Drawing.Size(160, 16);

But the form doesn't appear with this height. The width is correct but the height not!

I don't know what's the cause of this!

please help!
 
I just gave your code a try and it worked fine, the form I ended up with was
quite short and comparably very wide.

As for what might be going wrong for you... the class that frmCalculadora is
an instance of... are you anywhere within specifying it’s size after you have
set it’s size, but before you call Show() on it?

My first suspect would be in anything handling the Activated event, however
such code could exist in many places.

Another thing you might try to do is set a breakpoint that fires whenever
the size is changed.

Brendan
 
Back
Top