[DllImport("winmm.dll", EntryPoint = "mciSendStringA")]
public static extern long mciSendString(String Command, long ReturnString, long ReturnLength, long Callback);
private void btnLoad_Click(object sender, EventArgs e)
{
openFileDialog1.ShowDialog();
if (openFileDialog1.FileName != "")
{
lblFileName.Text = openFileDialog1.FileName;
mciSendString("close all",0,0,0);
mciSendString("open" + lblFileName.Text + "alias song", 0, 0, 0);
}
}
private void btnPlay_Click(object sender, EventArgs e)
{
mciSendString("play song", 0, 0, 0);
}
private void btnStop_Click(object sender, EventArgs e)
{
mciSendString("stop song", 0, 0, 0);
}错误 3 找不到类型或命名空间名称“DllImport”(是否缺少 using 指令或程序集引用?) E:\C#例子\cs_LoadPlay\cs_LoadPlay\Form1.cs 17 10 cs_LoadPlay
各位大狭帮帮忙!!!!!!!!多谢!!!!!!!!!111