I've been meaning to ask this question for a while.
It appears that if I want to set a maximum width of a form then I have to set a maximum height as well.
Is this right?
If so, which of the multitude of variables do I use, in this situation, to set the maximum form height to the height of the window?
Screen.PrimaryScreen.Bounds?, Screen.GetWorkingArea(New Point(0, 0))?
Eta: From further investigation, I think PrimaryScreen.Bounds and GetWorkingArea are the same.
Also, having thought a little more, should I put Int32.MaxValue into the height property instead of the max height of the window?
Yes, you do have to set the max width and height together using a Size instance. If you do not want to limit one of the dimensions, you might want to consider using System.Windows.Forms.SystemInformation.MaxWindowTrackSize to get the max for the "unlimited" dimension.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With