在Vb.net Windows应用程序中使用OpenFileDialog转到lastOpened文件夹 [英] go to lastOpened Folder using OpenFileDialog In Vb.net Windows Application

查看:80
本文介绍了在Vb.net Windows应用程序中使用OpenFileDialog转到lastOpened文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Windows Form应用程序有要求
问题如下:
我已经放了一个OpenFileDialog,
并通过浏览打开它
单击按钮.
要从文件夹中获取特定文件.
让ABCD成为文件夹.
并且在c盘中.
我单击浏览"按钮转到ABCD文件夹,然后从该文件夹中选择一个文件.
并在文本框1"中找到了路径,接下来我再次单击浏览"按钮

在这里,我想要当我单击浏览按钮然后
它应该带我到那个Folder(最后打开)表示ABCD文件夹.

能做完吗?
请协助

I have a requirement in windows Form application
The Issue is as follows:
I have Put a OpenFileDialog,
and Opening it with Browse
Button Click.
To get a particular file from a Folder.
Let ABCD is a Folder.
and is In c Drive.
I clicked Browse button get to the ABCD folder and choosen a file.from that Folder.
and got the Path In textbox1,next i again clicked the browse button

here I want that when I click browse Button then
it should take me to that Folder(last opened) means ABCD folder.

Can this be Done.
Please Assist

推荐答案

好,我知道了解决方法
刚刚将InitialDirectory路径设置为Blank
ok I got the Solution
have just set the InitialDirectory path Blank
openFileDialog.InitialDirectory = ""


设置 InitialDirectory属性 [ ^ ]的 OpenFileDialog [ ^ ]在您的文本框中.
Set the InitialDirectory Property[^] of the OpenFileDialog[^] to the path in your text box.


这篇关于在Vb.net Windows应用程序中使用OpenFileDialog转到lastOpened文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆