I want to use a custom message box. When clicking 'Yes' in the message box form, an event is ran to open another child form in my project. My problem is the message box form stays open? No matter where I place the code to close a form, Im unable to close the message box form. My goal is to close the message box after the next form opens.
Any tips?
Custom message Box Help
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Custom message Box Help
"ShowDialog" is an synchronous method. It executes and doesn't return until after the executed form clases.
There is no way around this. There are methods but then you would have to learn Winforms to a deeper level and then know more about Windows.
It is better that you return a result from your custom messagebox and test it after the call to display the message box then display the new form.
There is no way around this. There are methods but then you would have to learn Winforms to a deeper level and then know more about Windows.
It is better that you return a result from your custom messagebox and test it after the call to display the message box then display the new form.