-2

Possible Duplicate:
center MessageBox in parent form

I am trying to make an C# application and I want to have my messageBox appear near the parent. I tried:

MessageBox.Show(this,"this operation does not work");

And this doesn't work.

Community
  • 1
  • 1

1 Answers1

0

Assuming you're using Windows Forms, create a new class which extends System.Windows.Form to mimic MessageBox. Set the Location property based on your new classes Parent.Location property.

sammarcow
  • 2,736
  • 2
  • 28
  • 56