FileDialog.Title プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > FileDialog.Title プロパティの意味・解説 

FileDialog.Title プロパティ

ファイル ダイアログ ボックスタイトル取得または設定します

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

<LocalizableAttribute(True)> _
Public Property Title As
 String
Dim instance As FileDialog
Dim value As String

value = instance.Title

instance.Title = value
[LocalizableAttribute(true)] 
public string Title { get;
 set; }
[LocalizableAttribute(true)] 
public:
property String^ Title {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_Title ()

/** @property */
public void set_Title (String value)

プロパティ
ファイル ダイアログ ボックスタイトル既定値空の文字列 ("") です。

解説解説
使用例使用例

OpenFileDialog を初期化しTitle プロパティおよび Filter プロパティ設定してから、OpenFileDialog.Multiselect プロパティtrue設定してユーザー複数ファイル選択できるようにするコード例次に示します。この例を実行するには、OpenFileDialog1 という名前の OpenFileDialog と、fileButton という名前の Button を含むフォームコード貼り付けます。そして、フォームコンストラクタまたは Load メソッドInitializeOpenFileDialog メソッド呼び出します。またこの例では、Button コントロールClick イベントが、この例で定義されているイベント ハンドラ関連付けられている必要があります

Private Sub InitializeOpenFileDialog()
    Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog

    ' Set the file dialog to filter for graphics files.
    Me.OpenFileDialog1.Filter = _
    "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*"

    ' Allow the user to select multiple images.
    Me.OpenFileDialog1.Multiselect = True
    Me.OpenFileDialog1.Title = "My Image Browser"
End Sub

Private Sub fileButton_Click(ByVal
 sender As System.Object, _
    ByVal e As System.EventArgs) Handles
 FileButton.Click
    OpenFileDialog1.ShowDialog()
End Sub

private void InitializeOpenFileDialog()
{
    this.OpenFileDialog1 = new System.Windows.Forms.OpenFileDialog();

    // Set the file dialog to filter for graphics files.
    this.OpenFileDialog1.Filter = 
        "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|" + 
        "All files (*.*)|*.*";

    // Allow the user to select multiple images.
    this.OpenFileDialog1.Multiselect = true;
    this.OpenFileDialog1.Title = "My Image Browser";
    
}

private void fileButton_Click(System.Object
 sender, System.EventArgs e)
{
    OpenFileDialog1.ShowDialog();
}

void InitializeOpenFileDialog()
{
   this->OpenFileDialog1 = gcnew System::Windows::Forms::OpenFileDialog;
   
   // Set the file dialog to filter for graphics files.
   this->OpenFileDialog1->Filter =
      "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|" +
      "All files (*.*)|*.*";
   
   // Allow the user to select multiple images.
   this->OpenFileDialog1->Multiselect = true;
   this->OpenFileDialog1->Title = "My Image Browser";
}

void fileButton_Click( System::Object^ sender, System::EventArgs^
 e )
{
   OpenFileDialog1->ShowDialog();
}
private void InitializeOpenFileDialog()
{
    this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
    // Set the file dialog to filter for graphics files.
    this.openFileDialog1.set_Filter("Images (*.BMP;*.JPG;*.GIF)|"
 
        + "*.BMP;*.JPG;*.GIF|All files (*.*)|*.*");
    // Allow the user to select multiple images.
    this.openFileDialog1.set_Multiselect(true);
    this.openFileDialog1.set_Title("My Image Browser");
} //InitializeOpenFileDialog

private void fileButton_Click(Object sender,
 System.EventArgs e)
{
    openFileDialog1.ShowDialog();
} //fileButton_Click
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

FileDialog.Title プロパティのお隣キーワード
検索ランキング

   

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



FileDialog.Title プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS