国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 開發(fā)設(shè)計(jì) > 正文

使用C#選擇文件夾、打開文件夾、選擇文件

2019-11-06 06:40:11
字體:
供稿:網(wǎng)友
復(fù)制代碼
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace TestFolderBrowserDialog{    public partial class Form1 : Form    {        public Form1()        {            InitializeComponent();        }        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");        }    }}復(fù)制代碼
上一篇:Unity Profiler性能分析

下一篇:UVa442

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 伽师县| 临澧县| 营山县| 翁牛特旗| 松潘县| 焦作市| 甘南县| 迁西县| 马尔康县| 永德县| 沽源县| 江阴市| 湘阴县| 普兰县| 普定县| 龙里县| 桂平市| 巨野县| 祁门县| 沿河| 修文县| 明溪县| 靖边县| 米脂县| 奉化市| 工布江达县| 岫岩| 扬中市| 岳阳市| 禄丰县| 西平县| 平武县| 普兰县| 新宁县| 丹阳市| 陕西省| 阿坝| 宁安市| 山东省| 洪泽县| 宿松县|