Methods not executing in correct order

  • Thread starter Thread starter lakepeir
  • Start date Start date
L

lakepeir

Hello,

I have to methods that I call:

PopulateTextField()
PlaySound()

and the PlaySound() method executes before the PopulateTextField()
method. Please help me to understand why this happens? Thanks.
 
What is making you think that PlaySound is executing first? Have you
stepped through your code to verify this? Is there any other place in your
code that would call this method?
 
Hello (e-mail address removed),

I think your Populatetextfield might also involve refreshing of the form
which is taking time to show up and your sound file plays before all of the
text boxes are refreshed. Maybe setting up a call to Application.Doevents
can help things a bit.

Regards,
Cyril Gupta
 
Back
Top