FormBorderStyle 列挙型

定義

フォームの境界線スタイルを指定します。

public enum class FormBorderStyle
[System.Runtime.InteropServices.ComVisible(true)]
public enum FormBorderStyle
public enum FormBorderStyle
[<System.Runtime.InteropServices.ComVisible(true)>]
type FormBorderStyle = 
type FormBorderStyle = 
Public Enum FormBorderStyle
継承
FormBorderStyle
属性

フィールド

Fixed3D 2

固定された 3D 境界線。

FixedDialog 3

太い固定されたダイアログ スタイルの境界線。

FixedSingle 1

固定された一重線の境界線。

FixedToolWindow 5

サイズ変更できないツール ウィンドウの境界線。 ツール ウィンドウは、タスクバー、またはユーザーが Alt + Tab キーを押したときに表示されるウィンドウには表示されません。 FixedToolWindow を指定するフォームはタスクバーに表示されませんが、ShowInTaskbar プロパティが false に設定されていることを確認する必要があります。既定値は true です。

None 0

境界線なし。

Sizable 4

サイズ変更できる境界線。

SizableToolWindow 6

サイズ変更できるツール ウィンドウの境界線。 ツール ウィンドウは、タスクバー、またはユーザーが Alt + Tab キーを押したときに表示されるウィンドウには表示されません。

この例では、フォームの罫線のスタイルを に Fixed3d 変更し、ラベルを使用して罫線の情報を表示します。 この例では、 という名前Form1の が既にForm作成されていることを前提としています。

public:
   void InitMyForm()
   {
      // Adds a label to the form.
      Label^ label1 = gcnew Label;
      label1->Location = System::Drawing::Point( 80, 80 );
      label1->Name = "label1";
      label1->Size = System::Drawing::Size( 132, 80 );
      label1->Text = "Start Position Information";
      this->Controls->Add( label1 );
      
      // Changes the border to Fixed3D.
      FormBorderStyle = ::FormBorderStyle::Fixed3D;
      
      // Displays the border information.
      label1->Text = String::Format( "The border is {0}", FormBorderStyle );
   }
public void InitMyForm()
{
 // Adds a label to the form.
 Label label1 = new Label();
 label1.Location = new System.Drawing.Point(80,80);
 label1.Name = "label1";
 label1.Size = new System.Drawing.Size(132,80);
 label1.Text = "Start Position Information";
 this.Controls.Add(label1);

 // Changes the border to Fixed3D.
 FormBorderStyle = FormBorderStyle.Fixed3D;

 // Displays the border information.
 label1.Text = "The border is " + FormBorderStyle;	
}
Public Sub InitMyForm()
   ' Adds a label to the form.
   Dim label1 As New Label()
   label1.Location = New System.Drawing.Point(80, 80)
   label1.Name = "label1"
   label1.Size = New System.Drawing.Size(132, 80)
   label1.Text = "Start Position Information"
   Me.Controls.Add(label1)
   
   ' Changes the border to Fixed3D.
   FormBorderStyle = FormBorderStyle.Fixed3D
   
   ' Displays the border information.
   label1.Text = "The border is " + FormBorderStyle
End Sub

注釈

この列挙は、Form クラスで使用します。 フォームのさまざまなスタイルを表します。 既定のスタイルは です Sizable

適用対象

こちらもご覧ください