Interrupts the execution to process the message queue

I have a loop routine and I need Interrupts the execution of an application to process the message queue.

See the code beneath


bool continua = true;
while (continua)
{
    try
    {
        File.Copy(txtOrigem.Text, txtDestino.Text, true);
        grpCopiando.Visible = false;
    }
    catch
    { }
}

 

Thank you




Answer this question

Interrupts the execution to process the message queue