0

Hi I've added a contextMenuStrip on a dataGrid in WindowsForm, but first time after right click, form minimize. I re-open it and now right click show me contexMenuStrip. Can you give me a solution? Regards.

EDIT: I've added another contexMenuStrip to another dataGrid and I see that first click minimize form (but not if I use .showDialog() command), but all the other works, why?

user1849976
  • 53
  • 1
  • 10
  • 1
    Is there something in your code that is making the form minimize? That doesn't sound like the default behavior. It might help if you can post the code you are using (either in the question, or if it is very long, at https://gist.github.com – Moshe Katz Dec 25 '12 at 17:50
  • Hi, I never minimize the form in the program... – user1849976 Dec 25 '12 at 18:34
  • Can you show us the code? It would make it much easier to help. – Moshe Katz Dec 26 '12 at 03:25

1 Answers1

1

Search for FormWindowState.Minimized in your whole project, set break point there, run debugger and look, if your program runs there.

VladL
  • 12,769
  • 10
  • 63
  • 83