How to save last folder in openFileDialog?

前端 未结 8 1973
刺人心
刺人心 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:13

    The following is all you need to make sure that OpenFileDialog will open at the directory the user last selected, during the lifetime off your application.

    OpenFileDialog OpenFile = new OpenFileDialog();
    OpenFile.RestoreDirectory = false;
    

提交回复
热议问题