BoundsSpecified 列挙体
この列挙体には、メンバ値のビットごとの組み合わせを可能にする FlagsAttribute 属性が含まれています。
名前空間: System.Windows.Formsアセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

<FlagsAttribute> _ Public Enumeration BoundsSpecified

メンバ名 | 説明 | |
---|---|---|
![]() | All | Location プロパティと Size プロパティの値が両方とも定義されています。 |
![]() | Height | コントロールの高さが定義されています。 |
![]() | Location | コントロールの X 座標と Y 座標が両方とも定義されています。 |
![]() | None | 範囲は指定されていません。 |
![]() | Size | Width プロパティと Height プロパティの値が両方とも定義されています。 |
![]() | Width | コントロールの幅が定義されています。 |
![]() | X | コントロールの左端が定義されています。 |
![]() | Y | コントロールの上端が定義されています。 |


Private Sub MyForm_Layout(ByVal sender As Object, _ ByVal e As System.Windows.Forms.LayoutEventArgs) Handles MyBase.Layout ' Center the Form on the user's screen everytime it requires a Layout. Me.SetBounds((System.Windows.Forms.Screen.GetBounds(Me).Width / 2) - (Me.Width / 2), _ (System.Windows.Forms.Screen.GetBounds(Me).Height / 2) - (Me.Height / 2), _ Me.Width, Me.Height, System.Windows.Forms.BoundsSpecified.Location) End Sub
private void MyForm_Layout(object sender, System.Windows.Forms.LayoutEventArgs e) { // Center the Form on the user's screen everytime it requires a Layout. this.SetBounds((Screen.GetBounds(this).Width/2) - (this.Width/2), (Screen.GetBounds(this).Height/2) - (this.Height/2) , this.Width, this.Height, BoundsSpecified.Location); }
private: void MyForm_Layout( Object^ /*sender*/, System::Windows::Forms::LayoutEventArgs^ /*e*/ ) { // Center the Form on the user's screen everytime it requires a Layout. this->SetBounds( (Screen::GetBounds( this ).Width / 2) - (this->Width / 2), (Screen::GetBounds( this ).Height / 2) - (this->Height / 2), this->Width, this->Height, BoundsSpecified::Location ); }
private void MyForm_Layout(Object sender, System.Windows.Forms.LayoutEventArgs e) { // Center the Form on the user's screen everytime it requires a Layout. this.SetBounds(Screen.GetBounds(this).get_Width() / 2 - this.get_Width() / 2, Screen.GetBounds(this).get_Height() / 2 - this.get_Height() / 2, this.get_Width(), this.get_Height(), BoundsSpecified.Location); } //MyForm_Layout

Windows 98, Windows 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
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- BoundsSpecified 列挙体のページへのリンク