Per Erik Strandberg /cv /kurser /blog

We started discussing the size of a "program" and I made a minimal test that illustrates the MaximumSize and MinimumSize members of a form (and the Resize eventhandler).

By default a form can be made pretty small:
http://www.pererikstrandberg.se/blog/code/SizedFormTest1.png

By adding something like this (probably only the second line) you get a decent minimal seize

    this.MaximumSize = new System.Drawing.Size(800, 600);
    this.MinimumSize = new System.Drawing.Size(320, 240);

I added the sizes in the title bar of the form.
http://www.pererikstrandberg.se/blog/code/SizedFormTest2.png

Take a look at the code here [1] or download an executable here: [2]


Tillhör Kategori Programmering.