Reputation:
I've encountered an annoying problem:
When I set my form's ClientSize
property to match 300*300
, the size indeed does change, but it's totally not 300*300
. Actually, it's not even x*x
but rather x*y
, since its width is greater than its height.
This is a picture of my program after setting my form's ClientSize = new Size(300, 300);
and creating a black Panel
inside it with size 250*250
.
I measured them with photoshop and the black Panel
was indeed 250*250
, whereas the form's client size was more like 280*260
or so.
Why is this happening, have I understood the ClientSize
property's meaning wrong?
If so, how can I get the actual "drawing area" of my form to accurately match the size I want?
Upvotes: 1
Views: 1552