First, I’ll describe what I’ve got, and then I’ll ask the question, to everyone who read to the end a huge thank you. The question may seem silly, but google did not find the answer to it and can’t do anything, infuriates to the horror, but I have to write a diploma)) help good people.
There is a C # Windows Form project. I am writing in Visual Studio 2012
There is a main form FormMain on it menu (StripMenu) on which there are items "file", "service", "help", etc.
There is also a second form, FormProperties, which opens when you click on "service" -> "properties" in the menu (StripMenu) of the first form, with the following code
FormProperties formProperties = new FormProperties(); // просто создаем экземпляр formProperties.Show(); // и не модально открываем
In the second form, there is also a menu with the item "operations" in which there are sub-items "open", "add", etc.
Actually the question: Who can explain such incomprehensible behavior as, when you click on the "operation" for the FIRST time, the form remains in focus, is drawn for some reason under the calling FormMain, i.e. if the FormProperties form is scrambled with the mouse for the title and start to drive it across the screen, then when intercepting with the first form, it is covered up by it (the first form is drawn from above), although the first form is not in focus, when you click the second and subsequent times, the submenu opens, as it should be, the first form remains in the background. Why??!!