Messagebox help.

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

Guest

How do I write a Messagebox with print out the dot (...) to notify user to
wait for 5 minutes before I go to next step.
I want to Messagebox to print out the dot (...) every 5 second and no need
to press OK button but after waiting for 5 minutes the Messagebox automaticly
go away and continue to do other stuff.

My code are below but it doesn't behave as the way I wanted. Any help are
appreciated.

public static void ThreadProc()
{
for (int i = 0; i < 60; i++)
{
MessageBox.Show("Waiting for confirmation.","CF9 Message");
// Yield the rest of the time slice.
Thread.Sleep(5000);
}
}

Thank you.
 
The MessageBox is modal and will not yield or auto close.

To get what you want, add a custom form to your project that performs the
functionality you desire.

Use the System.Windows.Forms.Timer component and the Elasped event instead
of a loop.
 
Jim,
Thanks for your good info.

Jim Hughes said:
The MessageBox is modal and will not yield or auto close.

To get what you want, add a custom form to your project that performs the
functionality you desire.

Use the System.Windows.Forms.Timer component and the Elasped event instead
of a loop.
 
Back
Top