Reputation: 73
I'm looking to find out that when a user, enters their pin and clicks enter a message box displays saying processing your details. How would i then close that message box using a timer control? I have all the code to proceed to the next form or display another message box saying you have entered the incorrect pin, just looking to close the message box via a time control.
Upvotes: 1
Views: 850
Reputation: 15357
Try to avoid closing the message box from another location, but do the processing in the 'message box':
Upvotes: 1
Reputation: 2196
By design, message boxes are modal - they run their own little message pump and can't (or shouldn't) be closed from the outside. Pop up your own little form with the required label, buttons and icon and then you can simply set Visible = false when your timer expires. If you need other forms to not be actionable during this time, set their Enabled property to false until you hide the fake message box.
Upvotes: 1