How to save last folder in openFileDialog?

前端 未结 8 1951
刺人心
刺人心 2021-02-14 00:51

How do I make my application store the last path opened in openFileDialog and after new opening restore it?

OpenFileDialog openFileDialog1 = new Ope         


        
8条回答
  •  广开言路
    2021-02-14 01:22

    if your using

    Dim myFileDlog As New OpenFileDialog()
    

    then you can use this to restore the last directory

    myFileDlog.RestoreDirectory = True
    

    and this to not

    myFileDlog.RestoreDirectory = False
    

    (in VB.NET)

提交回复
热议问题