I am developing a winform application.
I want to play a sound file, till the dialogresult is OK for a message box. How can i achieve that.
For e.g.
/*Till*/ (MessageBox.Show("Alarm") == DialogResult.OK)
//Play a sound file
I tried while and do while but didn’t succeed. Do i need to use background worker or run the code in a separate thread ??
You don’t need to roll your own threading. .NET class library already did it for you. This is how you can do it: