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
 
Back
Top