Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
1067 | Sep 19,2002 12:55 PM UTC | Sep 19,2002 08:39 PM UTC | WinForms | 4 |
![]() |
Tags: FAQ |
while (System.Environment.TickCount - ticks < 10)
; //empty loop
This loop does not give the application a chance to handle pending window messages. If you want window messages processed during your long operation, you should call the Application.DoEvents() method during your processing loop. So, in our sample, if you add this call to the while loop, you will see the messages being processed.
while (System.Environment.TickCount - ticks < 10)
Application.DoEvents();
> while (System.Environment.TickCount - ticks < 10)
> ; //empty loop
>
>
> This loop does not give the application a chance to handle pending window messages. If you want window messages processed during your long operation, you should call the Application.DoEvents() method during your processing loop. So, in our sample, if you add this call to the while loop, you will see the messages being processed.
>
> while (System.Environment.TickCount - ticks < 10)
> Application.DoEvents();
>
> > while (System.Environment.TickCount - ticks < 10)
> > ; //empty loop
> >
> >
> > This loop does not give the application a chance to handle pending window messages. If you want window messages processed during your long operation, you should call the Application.DoEvents() method during your processing loop. So, in our sample, if you add this call to the while loop, you will see the messages being processed.
> >
> > while (System.Environment.TickCount - ticks < 10)
> > Application.DoEvents();
> >
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.