Ho hum.... so boring... Try this instead:
1. Install DirectX 9.0 SDK
2. Create a Windows Forms application
3. Add a reference to Microsoft.DirectX.DirectSound
4. Add the following code:
using Microsoft.DirectX.DirectSound;
....
private void button1_Click(object sender, System.EventArgs e)
{
Device dev = new Device();
dev.SetCooperativeLevel(this,CooperativeLevel.Normal);
BufferDescription buffer_desc = new BufferDescription();
SecondaryBuffer buffer = new SecondaryBuffer(
@"C:\WINDOWS\Media\ding.wav",
buffer_desc,
dev);
buffer.Play(0,BufferPlayFlags.Default);
}
Or use any wav file you like -- Live a little!!!!
- Harlow.