Form wont shrink down to a smaller size...

M

Me

Why won't my form shrink down to a smaller size?

Here is the code:

private void InitializeComponent()
{
//
// Form1
//
this.AutoScaleBaseSize = new
System.Drawing.Size(200, 200);
this.ClientSize = new
System.Drawing.Size(200, 200);
this.ControlBox = false;
this.FormBorderStyle =
System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Location = new
System.Drawing.Point(10, 10);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form1";
this.StartPosition =
System.Windows.Forms.FormStartPosition.Manual;

}





protected override void OnMouseDown
(MouseEventArgs e)
{
System.Drawing.Size x;
x = this.ClientSize;
x = this.Size;

this.Height = 5;
this.Width = 300;

x = this.ClientSize;
x = this.Size;

base.OnMouseDown (e);
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top