在Windows窗体中查找文件夹路径 [英] Find folder path in windows form

查看:110
本文介绍了在Windows窗体中查找文件夹路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我将文本文件保存在窗口应用程序文件夹中.我打开并阅读文件(我给出的确切路径).现在,我复制了整个项目并粘贴到其他根目录中.现在如何管理该文本文件的打开和读取操作.

我知道在asp.net中,我们有Server.MapPath.但是以窗口形式怎么办?请指导我

谢谢.

Hi,

I saved text file in my window application folder. I open and read the file (the path i have given exactly). Now i copied the whole project and paste in some other root. Now how to manage that text file open and read operation.

I know in asp.net we have Server.MapPath. But in window form how to do? please guide me

Thank you.

推荐答案

只需简单地添加要包含的文件夹或文件的引用,只需右键单击保存所有表单的文件夹即可.
Just simply add references of the folder or files which you want to include, by right clicking on your folder where you have kept all your forms..


我不知道您在做什么,但是您可以尝试

I don''t know what you are doing but you try this

Application.StartupPath




欲了解更多信息,请点击这里

http://msdn.microsoft.com/en-us/library/system.windows.forms.application.startuppath.aspx [ ^ ]




For more information check here

http://msdn.microsoft.com/en-us/library/system.windows.forms.application.startuppath.aspx[^]


这篇关于在Windows窗体中查找文件夹路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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