I need to show a message box to user, with yes no options, but not to suspend the process of my function, it is a lengthy function that takes a minute or so to complete.
the task of messagebox is to asks the user to continue or not. if the user clicks yes, nothing special happens, the work continues to complete, if user don’t clicks any buttons, the process must do the task, and when it finishes, the messagebox must disappears, but if the user clicks no, the function must exit.(like the calculator when calculating for example 10000000!).
I need to show a message box to user, with yes no options, but
Share
Sounds like a good time to use a Background Worker. Keeps the UI responsive, while the background task does the long computation. It supports cancellation.