实现效果:
知识运用:
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); }