Messagebox help.

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.
 
J

Jim Hughes

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top