目录选择:

FolderBrowserDialog dialog = new FolderBrowserDialog();
            dialog.Description = "请选择文件路径";
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                string foldPath = dialog.SelectedPath;
                MessageBox.Show("已选择文件夹:" + foldPath, "选择文件夹提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.textBox1.Text = foldPath;
            }

文件选择:

OpenFileDialog fileDialog = new OpenFileDialog();
fileDialog.Multiselect = true;
fileDialog.Title = "请选择文件";
fileDialog.Filter="所有文件(*.*)|*.*";
if (fileDialog.ShowDialog() == DialogResult.OK)
{
string file=fileDialog.FileName;
MessageBox.Show("已选择文件:" + file,"选择文件提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
}

 

关于绘图:

http://www.cnblogs.com/peterzb/archive/2009/07/27/1532288.html

http://www.cnblogs.com/peterzb/archive/2009/07/19/1526555.html

posted on 2017-10-23 11:45  邢帅杰  阅读(808)  评论(0编辑  收藏  举报