I have a large application with several forms, any of them could get a MessageBox
(MessageBox.Show()
) that is modal and locks the form.
On activation of another form I now need to find this MessageBox
and bring the form that has this MessageBox
to front. Is there any way to check this?
I know about the Application.OpenForms
property, maybe there is something like this for MessageBox
?
Edit1 : For example, say that we open Winform1, then a event in Winform1 will go to the mainController that opens Winform2. Lateron Winform1 is getting a MessageBox.Show, But its fully possible to bring Winform2 to front(above Winform1). So now I need to react to the Winform.Activated to check if there is any MessageBox.Show and if so, bring this form that holds the MessageBox to front.