play wave sound in C#

  • Thread starter Thread starter Guest
  • Start date Start date
public static void PlaySound()

{

String fileName = @"C:/Windows/Media/tada.wav";

PlaySound(fileName,0,1);

}

[DllImport("winmm.dll")]

private static extern bool PlaySound(string lpszName,

int hModule, int dwFlags);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top