How can I get the size a form would have in a Maxized windowstate without maximizing it?
I take a picture of the map control. I want to maximize the window when taking a snapshot, but without notifying the user. It seems that the state of the form window does not change the size of the form when it is hidden:
this.Hide(); this.WindowState = FormWindowState.Maximized;
It works great when not hiding.
So, I'm trying to set the size manually, but you need to know the maximum width and height of the state:
// x & y ??? this.Size = new Size(x,y);
source share