3

I'm having a problem with MessageBoxes. When a MessageBox pops up and I go to another window/program the MessageBox sometimes winds up behind the parent dialog. Thus I'm not able to discard the MessageBox since the parent dialog is disabled and I can't move it.

Is there any way of making the MessageBox pop to the front when the parent dialog is clicked or similar? I'm using C#.

Best Regards

Robin Rye
  • 480
  • 1
  • 7
  • 20

1 Answers1

5

When you call MessageBox.Show() it has an overload that takes the Owner as first parameter :

MessageBox.Show(ParentForm, "Title",...)

That should help with this issue.

MBen
  • 3,956
  • 21
  • 25