auto close a messagebox on event firing, C#

  • Thread starter Thread starter Renster
  • Start date Start date
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
 
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.
 
Back
Top