I want in the win Application (written in C#), the sound (Wav Format) play as Background Sound, and mouse over Control play small wav sound File,
and when Click on Button, Stop Background Sound and ... .
Thanks For your guidance.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
You could try look around in the System.Media namespace. There is a SoundPlayer which is able to play Wave files.
To play a wav file in a loop, you can use the following code:
To stop playing, you simple call Stop():
Play around a bit, there's more if you need it.
Did you try to play each of them in a separate thread ?
you can use Windows Media Player:
reference C:\Windows\System32\wmp.dll in your project
to launch a wav file:
for the second wav file, do the same thing with another instance of WindowsMediaPlayer etc...
you can also use Managed DirectX : Managed DirectX Tutorial Part 2