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

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

OpenFileDialog.Multiselect プロパティ

ダイアログ ボックス複数ファイル選択できるかどうかを示す値を取得または設定します

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

Dim instance As OpenFileDialog
Dim value As Boolean

value = instance.Multiselect

instance.Multiselect = value
public bool Multiselect { get;
 set; }
public:
property bool Multiselect {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_Multiselect ()

/** @property */
public void set_Multiselect (boolean value)

プロパティ
ダイアログ ボックス複数ファイル同時に選択できる場合trueそれ以外場合false既定値false です。

解説解説
使用例使用例

OpenFileDialog を初期化しTitle プロパティおよび Filter プロパティ設定してから、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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
OpenFileDialog クラス
OpenFileDialog メンバ
System.Windows.Forms 名前空間
FileDialog.FileNames プロパティ
FileDialog.Filter プロパティ



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

辞書ショートカット

すべての辞書の索引

「OpenFileDialog.Multiselect プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS