how can i close a messagebox in code? ( i want to close it 3min after the messagebox being popped up , if the user doesnt close it )
thanks
Printable View
how can i close a messagebox in code? ( i want to close it 3min after the messagebox being popped up , if the user doesnt close it )
thanks
Create your own .
so your sure theres no way of just getting a reference to the messagebox window?
Just a thought, i have not tested it: What about putting it on another thread? and abort that thread after a while and continue with the main thread?
If it's on separate thread , first it would lose its behaviour as messagebox (it can be overcome by other windows . tested) . Aborting the thread (I think) will not make it disappear .Quote:
Originally posted by Lunatic3
Just a thought, i have not tested it: What about putting it on another thread? and abort that thread after a while and continue with the main thread?
use a timer
Is the functionality you after more like a balloon-tip window? Because there is a free project at codeproject, and a dozen or more 3rd party controls..Quote:
Originally posted by persianboy
how can i close a messagebox in code? ( i want to close it 3min after the messagebox being popped up , if the user doesnt close it )
thanks
If its a standard system messagebox... probably not, since you cannot instantiate an instance of messagebox, only call .Show on a shared instance that is used by your application.
Best bet would be to make your own custom messagebox control.