FileDialog.Title プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

[LocalizableAttribute(true)] public: property String^ Title { String^ get (); void set (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


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からFileDialog.Title プロパティを検索する場合は、下記のリンクをクリックしてください。

- FileDialog.Title プロパティのページへのリンク