Embedding a File Explorer instance in a Windows Forms application form

前端 未结 8 1398
心在旅途
心在旅途 2020-12-01 02:04

My (C#, .NET 3.5) application generates files and, in addition to raising events that can be caught and reacted to, I want to display the target folder to the user in a form

8条回答
  •  心在旅途
    2020-12-01 02:26

    If you want to open a different window to display the target folder's content you can use System.Windows.Forms.OpenFileDialog, or SaveFileDialog, or inherit from FileDialog and extend it.

    To allow the user to select a folder you can use FolderBrowserDialog, though as a user I don't like that control.

    Does this help or you absolutely have to embed a control in your form?

    Asaf

提交回复
热议问题