惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
Vercel News
Vercel News
Microsoft Azure Blog
Microsoft Azure Blog
爱范儿
爱范儿
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
H
Help Net Security
罗磊的独立博客
The Cloudflare Blog
J
Java Code Geeks
博客园 - 叶小钗
I
InfoQ
B
Blog
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
腾讯CDC
月光博客
月光博客
博客园_首页
雷峰网
雷峰网
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
美团技术团队
T
The Blog of Author Tim Ferriss
博客园 - 司徒正美

博客园 - 飞舞的蒲公英

开发式新手引导设计思想 flash系统奔溃的主要原因 WinRAR(WinZip)压缩与解压实现(C#版Window平台) c#真正判断文件类型 winform文件拖入 C#图片无损压缩 as3.0 动态文本属性大全 卡​马​克​卷​轴​算​法​研​究​_​地​图​双​缓​冲 春卷活动心得 As3 常用日期工具 As3 计算两个日期之间的天数差 解决Asp.net Mvc返回JsonResult中DateTime类型数据格式的问题 C#图片压缩算法 C#图片处理之: 另存为压缩质量可自己控制的JPEG C# :实现水印与图片合成,并利用Graphics 压缩图像质量 , (委托实现listBox的动态添加提示) C#放缩、截取、合并图片并生成高质量新图的类 手机游戏模拟器汇总 用于开发 SQL SERVER 2008 无法启动T-SQL调试的解决方法 WinAPI 操作串口
c#winform选择文件,文件夹,打开指定目录方法
飞舞的蒲公英 · 2015-03-20 · via 博客园 - 飞舞的蒲公英
private void btnFile_Click(object sender, EventArgs e)
{
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);
}
}

private void btnPath_Click(object sender, EventArgs e)
{
FolderBrowserDialog dialog = new FolderBrowserDialog();
dialog.Description = "请选择文件路径";
if (dialog.ShowDialog() == DialogResult.OK)
{
string foldPath = dialog.SelectedPath;
MessageBox.Show("已选择文件夹:" + foldPath, "选择文件夹提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}

private void btnOpen_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("Explorer.exe","c:\\windows");
}