I understand what you mean...
Mostly I use the standard message dialogs as provided by the environment as suggested in the previous post.
But there was a time (a while ago) when I also required a dialog box with a timeout - that is, if the user did not respond in a reasonable time, the form would close with the default option selected.