BoundsSpecified 列挙体とは? わかりやすく解説

BoundsSpecified 列挙体

コントロールサイズ位置定義するときに使用するコントロール範囲指定します

この列挙体には、メンバ値のビットごとの組み合わせ可能にする FlagsAttribute 属性含まれています。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

<FlagsAttribute> _
Public Enumeration BoundsSpecified
Dim instance As BoundsSpecified
[FlagsAttribute] 
public enum BoundsSpecified
[FlagsAttribute] 
public enum class BoundsSpecified
/** @attribute FlagsAttribute() */ 
public enum BoundsSpecified
FlagsAttribute 
public enum BoundsSpecified
メンバメンバ
解説解説

この列挙体のメンバは、Control クラスの SetBoundsCore メソッドおよび SetBounds メソッド呼び出すときに使用します

使用例使用例
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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「BoundsSpecified 列挙体」の関連用語

BoundsSpecified 列挙体のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



BoundsSpecified 列挙体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS