Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27034

[RESOLVED] System.Media.SoundPlayer class? How to get sound stopped playing?

$
0
0
I tried to setup the soundplayer to play a wav file when clicking in a picturebox. This works synchronously and asynchronously except for the following problem. When playing synchronously, if I click all over the picturebox, then when the sound finishes playing, it plays again and again as many times as I clicked. I can't figure out how to exit the mouse click event before the sound stops playing, since there are no properties to determine when a sound starts and finishes. Is there a way around this?

Also is it possible to play overlapping sounds? 2 different tunes at the same time for example?

So I guess this is 2 questions, but any answers are good for me!

Viewing all articles
Browse latest Browse all 27034

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>