Form.SizeGripStyle 属性

定义

获取或设置在窗体右下角显示的大小调整手柄的样式。Gets or sets the style of the size grip to display in the lower-right corner of the form.

public:
 property System::Windows::Forms::SizeGripStyle SizeGripStyle { System::Windows::Forms::SizeGripStyle get(); void set(System::Windows::Forms::SizeGripStyle value); };
public System.Windows.Forms.SizeGripStyle SizeGripStyle { get; set; }
member this.SizeGripStyle : System.Windows.Forms.SizeGripStyle with get, set
Public Property SizeGripStyle As SizeGripStyle

属性值

SizeGripStyle,表示要显示的大小手柄的样式。A SizeGripStyle that represents the style of the size grip to display. 默认值为 AutoThe default is Auto

异常

指定值不在有效值范围内。The value specified is outside the range of valid values.

示例

下面的示例演示当 Form 不可调整大小时,如何隐藏 Form 的大小手柄。The following example demonstrates how to hide the size grip for a Form when the Form is not resizable.

private:
   void ShowMyDialogBox()
   {
      Form^ myForm = gcnew 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();
   }
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();
}
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

注解

此属性使您可以确定窗体上显示大小调整手柄的时间。This property enables you to determine when the sizing grip is displayed on the form. 您可以设置此属性以显示大小调整手柄,或根据 FormBorderStyle 属性的设置自动显示它。You can set this property to display the sizing grip or have it automatically displayed based on the setting of the FormBorderStyle property.

适用于

另请参阅