VB 2005: How to Make MessageBox Disappear automatically?

Dear Experts:

I wonder whether there is a way to make a  message (MessageBox.Show) to disappear automatically after three seconds of display so that the user don't have to click to close the box.

Thanks a lot!
dutaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jorge PaulinoIT Pro/DeveloperCommented:
The better solution is to create your own messagebox, but you can also do a walkaround and use send keys to close it. It's not 100% safe because the user can change the focus to another point, but most of the times it will work.
0
dutaAuthor Commented:
YOU SAID: to create your own messagebox,

MY QUESTION:  Can you kindly give me a sample code?

Thanks!
0
Jorge PaulinoIT Pro/DeveloperCommented:
Your own messagebox means to create a new form (modal) with a label and buttons to simulate a messagebox.
Here's some examples: http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_23565346.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

TechTiger007Commented:
A message box is nothing other than a form.
Create a form with a timer control and label. Overload Show() method of the form to get a string. When this method is called create a form assign the string to the label and start timer. On timer event when it reaches 3 minutes close the form
0
dutaAuthor Commented:
Thanks a lot for your kind tips.

I am a total novice. It may take a while for me to figure it out probably through
countless trial and errors.

It seems a little daunting task.

If you can kindly offer me a complete code, it will be tremendously appreciated.

But I know it may be too much for you :)

Thanks!
0
TechTiger007Commented:
duta
check out the link given by jpaulino, I think thats what you need
Below is one from the link
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_23167846.html#a20907999

credit goes to jpaulino
0
Éric MoreauSenior .Net ConsultantCommented:
0
dutaAuthor Commented:
I tried jpaulino's frmMessage.

It worked fine. But there is a little problem.
The form is displayed away from the main form.

Is there a way to make the frmMessage displayed in front of the main form>

Thanks!
0
Éric MoreauSenior .Net ConsultantCommented:
have you tried my example?
0
dutaAuthor Commented:
emoreau, I tried your tip.
I found one too many text in the MessageBox, which I am afraid may be a little distracting.
I also found that jpailino.s frmMessage was more friendly to custom-make :)

I am a total novice. My observation may be wrong.

Thanks!
0
Éric MoreauSenior .Net ConsultantCommented:
>>I found one too many text in the MessageBox

You put what you want. I have created many options as people often want many features but you don't have to use them all!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.