zoukankan      html  css  js  c++  java
  • winfrom 通过按钮选择文件

     private void ExcelBtn_Click(object sender, EventArgs e)
            {
                using (OpenFileDialog ofd = new OpenFileDialog())
                {
                    ofd.Filter = " Excel文件|*.xls";
                    if (ofd.ShowDialog() == DialogResult.OK)
                    {               
                        this.ExcelText.Text = ofd.FileName;
                    }
                }
            }

     //选择保存文件路径
            private void PutBtn_Click(object sender, EventArgs e)
            {
                using (SaveFileDialog sfd = new SaveFileDialog())
                {
                    sfd.Filter = "(*.xlsx)|*.xlsx";
                    sfd.Title = "结果输出:";
                    if (sfd.ShowDialog() == DialogResult.OK)
                    {
                        this.TB_Put.Text = sfd.FileName;
                    }
                }
            }
  • 相关阅读:
    hdoj_1556Color the ball
    wchar_t与char转换(总结)
    算法艺术——网络最大流
    poj_3268Silver Cow Party
    poj_2352Stars
    BellmanFord模板
    saas模式
    什么是管道
    什么是CMMI
    saas模式
  • 原文地址:https://www.cnblogs.com/nxj1997/p/13225806.html
Copyright © 2011-2022 走看看