Form.MaximumSize Property
.NET Framework 3.0
Gets the maximum size the form can be resized to.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Assembly: System.Windows.Forms (in system.windows.forms.dll)
[LocalizableAttribute(true)] public: virtual property Size MaximumSize { Size get () override; void set (Size value) override; }
/** @property */ public Size get_MaximumSize () /** @property */ public void set_MaximumSize (Size value)
public override function get MaximumSize () : Size public override function set MaximumSize (value : Size)
Not applicable.
Property Value
A Size that represents the maximum size for the form.This property enables you to limit the size of a form to a specified maximum size. You can use this feature when displaying multiple windows at the same time, to ensure that a single window does not cause other windows to be hidden. If this property is set to a Size object that is 0 in height and 0 in width, the form will have no maximum size beyond the limits set by Windows.
The following code example demonstrates setting the MaximumSize property.
public: Form1() : Form() { //This call is required by the Windows Form Designer. InitializeComponent(); //Set the maximum size, so if user maximizes form, it //will not cover entire desktop. this->MaximumSize = System::Drawing::Size( 500, 500 ); }
public Form1()
{
//This call is required by the Windows Form Designer.
InitializeComponent();
//Set the maximum size, so if user maximizes form, it
//will not cover entire desktop.
this.set_MaximumSize(new System.Drawing.Size(500, 500));
} //Form1
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: