How to play a sound from my program.
C#
2
Posts
2
Posters
1
Views
1
Watching
-
How to play a sound from my program. I have Visual Studio 2003. Net 1.0.] Help.
Vasildb
-
How to play a sound from my program. I have Visual Studio 2003. Net 1.0.] Help.
Vasildb
using System.Runtime.InteropServices; [System.Runtime.InteropServices.DllImport("kernel32")] private static extern int Beep(int dqFreq, int dqDuration); Beep (3000,25); => It will play a nice beep like in '80 years ;P If you are not happy with that you can also use the MCI functionalities provoded by the API (need import also) or ... simply play wave with: [System.Runtime.InteropServices.DllImport("Winmm.dll")] private static extern bool PlaySound(byte[] data, IntPtr hMod, UInt32 dwFlags);
La Richesse & la Gloire ne griseront jamais que les temples