Form.SizeGripStyle Property
Gets or sets the style of the size grip to display in the lower-right corner of the form.
[Visual Basic] Public Property SizeGripStyle As SizeGripStyle [C#] public SizeGripStyle SizeGripStyle {get; set;} [C++] public: __property SizeGripStyle get_SizeGripStyle(); public: __property void set_SizeGripStyle(SizeGripStyle); [JScript] public function get SizeGripStyle() : SizeGripStyle; public function set SizeGripStyle(SizeGripStyle);
Property Value
A SizeGripStyle that represents the style of the size grip to display. The default is SizeGripStyle.Auto
Exceptions
| Exception Type | Condition |
|---|---|
| InvalidEnumArgumentException | The value specified is outside the range of valid values. |
Remarks
This property enables you to determine when the sizing grip is displayed on the form. You can set this property to display the sizing grip or have it automatically displayed based on the setting of the FormBorderStyle property.
Example
[Visual Basic] Private Sub ShowMyDialogBox() Dim myForm As New Form() myForm.Text = "My Form" myForm.SetBounds(20, 20, 300, 300) myForm.FormBorderStyle = FormBorderStyle.FixedDialog ' Display the form with no grip since form is not resizable. myForm.SizeGripStyle = SizeGripStyle.Hide myForm.MinimizeBox = False myForm.MaximizeBox = False myForm.ShowDialog() End Sub [C#] private void ShowMyDialogBox() { Form myForm = new Form(); myForm.Text = "My Form"; myForm.SetBounds(20,20,300,300); myForm.FormBorderStyle = FormBorderStyle.FixedDialog; // Display the form with no grip since form is not resizable. myForm.SizeGripStyle = SizeGripStyle.Hide; myForm.MinimizeBox = false; myForm.MaximizeBox = false; myForm.ShowDialog(); } [C++] private: void ShowMyDialogBox() { Form* myForm = new Form(); myForm->Text = S"My Form"; myForm->SetBounds(20,20,300,300); myForm->FormBorderStyle = FormBorderStyle::FixedDialog; // Display the form with no grip since form is not resizable. myForm->SizeGripStyle = SizeGripStyle::Hide; myForm->MinimizeBox = false; myForm->MaximizeBox = false; myForm->ShowDialog(); }
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
Form Class | Form Members | System.Windows.Forms Namespace | FormBorderStyle | SizeGripStyle