clsBrowseFolder.cs
资源名称:P2P c#.rar [点击查看]
上传用户:hkhxjs
上传日期:2008-11-25
资源大小:155k
文件大小:1k
源码类别:
Internet/网络编程
开发平台:
C#
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using System.Windows.Forms.Design;
- using System.Drawing.Design;
- namespace Listener
- {
- public class BrowseFolder : System.Windows.Forms.Design.FolderNameEditor
- {
- public string SelectFolder()
- {
- FolderBrowser folder = new FolderBrowser();
- folder.Style = FolderBrowserStyles.ShowTextBox;
- folder.Description = "Share Folder";
- base.InitializeDialog(folder);
- if(DialogResult.OK == folder.ShowDialog())
- return folder.DirectoryPath;
- return "";
- }
- }
- }