如何让用户选择在Windows窗体中创建日志文件的路径? [英] How to let User choose a Path where Log file will be created in Windows Form ?
本文介绍了如何让用户选择在Windows窗体中创建日志文件的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我基本上正在开发一个应用程序来监控目录,我想让用户选择包含所有更新的文件的位置。我无法确定使用哪个控件来让用户选择文件创建路径
I am basically working on a application to monitor a Directory where I want User to choose location where file containing all the Updates will be Saved. I am not able to figure out which control to use to let User choose the File creation path
推荐答案
尝试 http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog %28v = vs.110%29.aspx [ ^ ]。
从.NET 2.0开始,有一个FolderBrowserDialog可用:[ ^ ]。
要选择目录,这将是我的选择。如果您愿意,也可以在该对话框中创建一个新文件夹。
MSDN如何使用FolderBrowserDialog:[ ^ ]。
Since .NET 2.0 there is a FolderBrowserDialog available: [^].
To select a Directory, this would be my choice. You can also create a new Folder from within that Dialog if you wish.
MSDN how-to use FolderBrowserDialog: [^].
这篇关于如何让用户选择在Windows窗体中创建日志文件的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文