Menustrip covers form panel

VAer-4038 766 Reputation points
2021-01-03T20:20:04.463+00:00

I have code for form: ChildForm1.WindowState = FormWindowState.Maximized

Property: FormBorderStyle = None

I have panel dock at the top of ChildForm1, and I have some contents at the top.

When I open ChildForm1, menustrip covers some content of form panel.

When maximize form, can it be maximized under menustrip, not behind menustrip.

Thanks.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,901 questions
{count} votes

Accepted answer
  1. Daniel Zhang-MSFT 9,626 Reputation points
    2021-01-05T08:08:57.183+00:00

    Hi VAer-4038,
    >>Does the "menustrip" in your description refer to the title bar of the child window?
    If not, please explain in detail.
    And have you set your parent form's WindowState property to Maximized?
    Due to parent form is a container for multiple-document interface (MDI) child forms, so there will be some problems when the child window is larger than the parent window.
    I made a test with your information and setted parent form's WindowState property to Maximized.
    Here are test result:
    Child form Maximized:
    53476-max.png
    Child form Minimized:
    53564-min.png
    >> this system icon is on the menustrip, not on the parent form. This icon is not child form icon.
    Which icon you are referring to, and you can change the icon of the child window to determine whether it is its icon.
    When I set FormBorderStyle to none or sizeable, the child form all appears on "menustrip".
    >>when I minimize child form, form icon disappears from menustrip; at this moment menustrip has buttons only.
    Does your "button" refer to icon or others?
    Best Regards,
    Daniel Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.