473,394 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Messagebox help.

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.
Nov 17 '05 #1
2 2087
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.

"ttan" <tt**@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
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.

Nov 17 '05 #2
Jim,
Thanks for your good info.

"Jim Hughes" wrote:
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.

"ttan" <tt**@discussions.microsoft.com> wrote in message
news:1C**********************************@microsof t.com...
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.


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Dennis C. Drumm | last post by:
I have ordered the book .NET Framework Solutions, In Search of the Lost Win32 API by John Paul Meuller which I think will help answer some of my questions I have regarding making custom...
2
by: Dennis C. Drumm | last post by:
This is a restatement of an earlier post that evidently wasn't clear. I am building a custom MessageBox dialog that has, among other things, a few new button options (yes to all, no to all, etc.)...
4
by: Tressa | last post by:
I have a messagebox that I only want to pop up only if it is not already being displayed on the screen. My code is still poping up the messagebox even though it is on the screen. What am I doing...
20
by: Peter E. Granger | last post by:
I'm having a strange problem (or at least it seems strange to me) trying to display a MessageBox in a VC++ .NET forms application. If I put the call to MessageBox::Show in the form's .h file, it...
10
by: Russ | last post by:
I've been trying to figure out how to show a simple messagebox with an OK button in my web client program (C#). I have looked at every reference to JScript and MessageBox that seemed even remotely...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.