[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Unexpected gap between MenuStrip and ToolStrip when Docked

Posted on 2014-08-27
Medium Priority
Last Modified: 2014-08-27
Hi all,

I have a C# WinForms application.
One of the forms has a MenuStrip at the top, then a ToolStrip, then the rest of the form
With these set to Dock = Top, they line up as expected, however there appears to be a border around them, leaving a White line separating them.

How do I dock these together leaving no gap?

Any help would be appreciated.

Question by:James Atkin
  • 2
LVL 70

Expert Comment

by:Éric Moreau
ID: 40287622
interesting. Normally the Margins property sets that but even if we put it at 0, I still see a little white line between the toolstrip and the container I have set to fill just under it. But I don't see this white line between the menustrip and the toolstrip.
LVL 70

Accepted Solution

Éric Moreau earned 2000 total points
ID: 40287638
as you can see in the image, I have been able to hide the white line.

the menustrip is docked at top and its height is 24.
the toolstrip is then docked at top and its height is 25.

finally, I have added a split container (just for the sake of demoing) and it is not docked to fill. Instead, I have set its location Y to 48 (24 + 25 - 1 for the white line).


Author Closing Comment

by:James Atkin
ID: 40287658
You're right, it looks like there is some strange issue with the Docking.
Your solution will work nicely, thanks...

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month19 days, 13 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question