0

Currently in my application the Message box is seen sometimes correctly, In some instances seen in the taskbar which shouldn't happen.

if (!flag)
{
   MessageBox.Show("Fileds Cannot be empty. Please follow the format", "Message");

   return false;
}
J. Steen
  • 15,470
  • 15
  • 56
  • 63
swathi
  • 15
  • 2

1 Answers1

1

Sounds like you may need to set the owner property of the MessageBox, answered by @Charlie in this post C# / .NET messagebox is not modal

To do this use the MessageBox.Show(IWin32Window, String, String) method, details here http://msdn.microsoft.com/en-us/library/4y3c0fky.aspx

Community
  • 1
  • 1
dante671
  • 117
  • 1
  • 10