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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top