比如,在public class Form1 : System.Windows.Forms.Form
{
后面添加stirng filename = "c:\\123.wav";或者你在窗体中加一个文本框和一个按钮,点按钮后弹出
OpenFileDialog dlg = new OpenFileDialog();
dlg.ShowDialog();
textBox1.Text = dlg.FileName;
filename = textBox1.Text;