C# 1.1 Windows Form MessageBox question

J

Jason Huang

Hi,

In the C# 1.1 Windows Form, is it possible to close a MessageBox after 0.5
second without the user's clicking (or keypressing) anything on the
MessageBox control?
Thanks for help.


Jason
 
M

Morten Wennevik [C# MVP]

Hi,

In the C# 1.1 Windows Form, is it possible to close a MessageBox after 0.5
second without the user's clicking (or keypressing) anything on the
MessageBox control?
Thanks for help.


Jason

Hi Jason,

No, but you can create your own messagebox that closes itself after a set amount of time. However, the point of a MessageBox is to call attention to the user, and the program has no way of knowing if the user noticed the message unless the user actively clicks OK.
 
V

vulpes

It would be easiest just to implement your own messagebox. A box with
a label and an OK button maybe takes 5 minutes to write. Then you can
just create a reference to the new box, open it and call dispose to it
after half a sec (in case it has not been closed already, be sure of
this).
 

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

Top