Click here to Skip to main content
15,919,341 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've to execute a do..while() loop to make a sound in my application. I want to show a message after the sound. So I coded the sound in the do loop. In the while() the condition will be the event handling method. If event handled the message box will be shown otherwise not. How can I do this. Please help

Thanks
Posted
Comments
Timberbird 24-Aug-11 9:01am    
What kind of event are you expecting? Do you mean kernel object or something like user input?
montevina 2 24-Aug-11 9:09am    
MouseMove Event

1 solution

If I get you correctly, then you want to play a sound and show a message if a method handles a procedure correctly. For this I would use a simple if construct, something like this

C#
void MainMethod()
       {
           if (EventHandlingMethod())
           {
               //play sound
               //show message
           }
       }

       bool EventHandlingMethod()
       {
           //Handle method here
           //If success return true
           //else return false
       }


Hope this helps
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900