I was putting the finishing touches on my widget engine and I encountered a rather annoying problem. My engine has a custom MsgBox function which overrides the framework's msgbox function once the engine has been imported into a solution. To make a long story short, my msgbox function shows a 'widget' object which is the size of a msgbox and has buttons, text.. etcetera... One of the defining features of a msgbox, is that it stops whatever is currently processing and waits for the user to click a button. Now normally I would just use the showdialog function on my widget and use a with statement to detect when the dialogresult value has been set. The problem is, showdialog messes up the parent/child relationships of my widgets so I am forced to use show(), which does not produce a value. Therefore I will have to somehow force my MsgBox function to wait for the OnClick event of one of its buttons BEFORE returning a value. How can I do this? Multi-Threading?

help