winform 收集

 

打开指定文件夹并选中文件,打开指定文件 .NET实现

原文地址:http://www.cnblogs.com/jx270/archive/2013/02/27/2934458.html

View Code
private void btnOpenFile_Click(object sender, EventArgs e)

    {

        string _FilePath = this.txtFileFullPath.Text.Trim();

        if (File.Exists(_FilePath))

        {

            //打开指定文件

            System.Diagnostics.Process.Start(_FilePath);

        }

    }

 

    private void button1_Click(object sender, EventArgs e)

    {

        string _FilePath = this.txtFileFullPath.Text.Trim();

        

        //打开指定文件夹选中文件(路径不存在则默认打开并选中我的文档)

        System.Diagnostics.Process.Start("explorer.exe", "/select," + _FilePath);

        

    }

 http://www.cnblogs.com/ushou/archive/2013/01/25/2875883.html

 

 WinForm的RadioButton使用小技巧

http://www.cnblogs.com/sjrhero/articles/1883155.html

 C# 利用 HttpWebRequest 和 HttpWebResponse 模拟登录有验证码的网站

http://www.cnblogs.com/mib23/p/3913016.html

 

C#遍历所有的Textbox控件并赋值为String.Empty

foreach (Control control in this.form1.Controls)  //  B/S

//foreach (Control control in this.Controls)  //  C/S

{    

    if (control.GetType().Name.Equals("TextBox"))
    {
       ((TextBox)control).Text = string.Empty;
    }

}

 

 

 

 

 

 

 

 

 

posted @ 2013-02-27 10:53  高山-景行  阅读(163)  评论(0编辑  收藏  举报