|
-
February 20th, 2010, 06:06 AM
#1
[Help] how do you trigger an event using sound?
I have writhen a windows form using C# that counts how long time there is between button presses and then show some statistics.
BUT now i want to make it work with sound instead.
the sound that I want it to react to is a gun shot, so it is rather loud :P
and of course i want it to ignore every other noice.
the code i have used looks like this:
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode==Keys.S)
{
..........
}
}
it would be really helpful if somebody could post some example code for me.
if you like to know more about my little projekt and see how it end you could follow me on twitter my name there is kimlundgren_
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|