I have windows forms app in which there is one MDI Parent form with one menu strip in the parent itself only and many child forms. The issue that I am facing is the menu strip expands vertically when I maximize the child form in the MDI parent form.
See below screenshots on imgur
Normal state
Click to see Normal
Maximised state
Click to see Maximised
See this
This is the MDI Parent designer code
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.AliceBlue;
this.BackgroundImage = global::DeskTimeWinApp.Properties.Resources.DeskTimeFullBrandLogo;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.ClientSize = new System.Drawing.Size(1184, 711);
this.Controls.Add(this.ManagerMenu);
this.DoubleBuffered = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.IsMdiContainer = true;
this.MainMenuStrip = this.ManagerMenu;
this.MaximumSize = new System.Drawing.Size(1920, 1080);
this.MinimumSize = new System.Drawing.Size(1200, 750);
this.Name = "frmManager";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Manager";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmManager_FormClosing);
this.Load += new System.EventHandler(this.frmManager_Load);
this.ManagerMenu.ResumeLayout(false);
this.ManagerMenu.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
This is the menustrip code from designer
this.ManagerMenu.BackColor = System.Drawing.Color.AliceBlue;
this.ManagerMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.taskMenuItem,
this.taskMasterMenuItem,
this.employeeMenuItem,
this.employeeReportsMenuItem,
this.reportsMenuItem,
this.versionMenuItem,
this.helpMenuItem});
this.ManagerMenu.Location = new System.Drawing.Point(0, 0);
this.ManagerMenu.Name = "ManagerMenu";
this.ManagerMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
this.ManagerMenu.Size = new System.Drawing.Size(1184, 24);
this.ManagerMenu.TabIndex = 0;
this.ManagerMenu.Text = "menuStrip1";
What I have tried:
I changed anchor and dock properties of the menu strip and the even once removed and added a new menu strip.