实现效果:
知识运用:
Process类的Start方法
实现代码:
private void button1_Click(object sender, EventArgs e) { OpenFileDialog open = new OpenFileDialog(); open.Filter = "EXE文件(*.exe)|*.exe"; if (open.ShowDialog() == DialogResult.OK) textBox1.Text = open.FileName; } private void button2_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start(textBox1.Text); }
原文地址:https://www.cnblogs.com/feiyucha/p/10323304.html
时间: 2024-11-09 05:03:21