auto close a messagebox on event firing, C#

R

Renster

Folks,

Im all too familiar with Messagebox.Show - but now I have a situation
where I need a similar sort of messagebox to appear, but to
automatically disappear when an event fires - ie, messagebox.show
("Please plug the device in the USB port"), then when the user plugs a
device in, and the device.connected event fires, the system
automatically kills the messagebox.

Any hints appreciated!

Cheers
 
K

Kevin Spencer

You would have to use a Dialog Box to do this. The MessageBox class
encapsulates a call to the WinAPI MessageBox function, which does not return
a handle to its' window, only the return value of the button pressed.

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

I had the same problem once. Fixed it using the same solution.
 

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