Form.SizeGripStyle 属性

定义

获取或设置在窗体右下角显示的大小调整手柄的样式。

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

SizeGripStyle,表示要显示的大小手柄的样式。 默认值为 Auto

例外

指定值不在有效值范围内。

示例

以下示例演示了如何隐藏不调整大小时Form的大小Form控制。

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

注解

此属性使你能够确定何时在窗体上显示大小控制。 可以将此属性设置为显示大小调整手柄,或者根据属性的设置 FormBorderStyle 自动显示该属性。

适用于

另请参阅