Application.DoEvents

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I find myself having to use Application.DoEvents to clear out my program
events before proceeding to the next line of code, especially when working
with MCI and using "NOTIFY" callback. Is this considered good programming
practice? I thought that I had read somewhere that using
Applicaiton.DoEvents was not a good practice.
 
Dennis said:
I find myself having to use Application.DoEvents to clear out my
program events before proceeding to the next line of code,
especially when working with MCI and using "NOTIFY" callback. Is
this considered good programming practice? I thought that I had
read somewhere that using
Applicaiton.DoEvents was not a good practice.


It is bad practice because it processes all messages in the message queue,
thus the user might even close the form at this point.


Armin
 
Dennis,

It is forever bad practise to start actions that are not needed.

Applications.DoEvents is checking the events and do those as needed. This
can include by instance the very much time consuming screenpainting.

I hope that this tells my opinion about this?

Cor
 

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