You need some sort of subclassing , but why don't you take the easier path and make your own custom message box with a timer .