Set folder browser dialog start location

后端 未结 6 552
长情又很酷
长情又很酷 2020-12-24 11:02

Is there any way to set the initial directory of a folder browser dialog to a non-special folder? This is what I\'m currently using

fdbLocation.RootFolder = Envir         


        
6条回答
  •  一向
    一向 (楼主)
    2020-12-24 11:44

    To set the directory selected path and the retrieve the new directory:

    dlgBrowseForLogDirectory.SelectedPath = m_LogDirectory;
    if (dlgBrowseForLogDirectory.ShowDialog() == DialogResult.OK)
    {
         txtLogDirectory.Text = dlgBrowseForLogDirectory.SelectedPath;
    }
    

提交回复
热议问题