PC Review


Reply
Thread Tools Rate Thread

Application.DoEvents

 
 
=?Utf-8?B?RGVubmlz?=
Guest
Posts: n/a
 
      9th Aug 2005
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 in Houston
 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      9th Aug 2005
"Dennis" <(E-Mail Removed)> schrieb
> 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

 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      9th Aug 2005
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


 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      9th Aug 2005
"Cor Ligthert [MVP]" <(E-Mail Removed)> schrieb
> Dennis,
>
> [...]


Sorry Cor, forgot to send my outbox yesterday.


Armin
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NotifyIcon Bug, Application.EnableVisualStyles, Application.DoEvents, and Memory Leaks Michael S. Malley Microsoft C# .NET 0 11th Mar 2004 08:43 PM
NotifyIcon Bug, Application.EnableVisualStyles, Application.DoEvents, and Memory Leaks Michael S. Malley Microsoft Dot NET Framework Forms 0 11th Mar 2004 06:22 PM
NotifyIcon Bug, Application.EnableVisualStyles, Application.DoEvents, and Memory Leaks Michael S. Malley Microsoft Dot NET Framework Forms 0 10th Mar 2004 09:52 PM
NotifyIcon Bug, Application.EnableVisualStyles, Application.DoEvents, and Memory Leaks Michael S. Malley Microsoft C# .NET 0 10th Mar 2004 09:52 PM
NotifyIcon Bug, Application.EnableVisualStyles, Application.DoEvents, and Memory Leaks Michael S. Malley Microsoft Dot NET Framework 0 10th Mar 2004 09:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:50 AM.