White line (1px) between mainmenu and toolbar controls

B

Bob Dankert

I am wondering if there is a way to get rid of the 1 pixel white line that
apprears between a MainMenu control and a ToolBar control (WinXP Pro SP2)?

An image of this white line is here:
http://www.question-mark.net/images/tbmenuline.jpg

Here is what I have tried:
Toolbar: Appearance is Flat, Divider is False, Location is 0,0
Form: It doesnt matter what the background color is

I have also tried drawing both the menu and the toolbar by overrideing the
Paint methods, and this does not work either.

If anyone has any suggestions, I would greatly appreciate it.

Thanks,

Bob Dankert
 
B

Bob Dankert

Jeffrey,

I tried you're test project and had the exact same results. I can post a
screen shot again if you would like, but it looks exactly like the first
screenshot I posted. I am using Windows XP Professional with SP2, VS2003,
..net 1.1 sp1 just as you are using. I have visual styles enabled in windows
XP (System Properties/Advanced/Performance/Setting/All check marks are
checked in Visual Effects)

I will see if I can try this on a 2000 box to see if this is related to
Windows XP or not.

Thanks!

Bob
 
B

Bob Dankert

As a follow-up to my previous message, this behavior did not occur in
Windows 2003 SBS. Unfortunately, that is the only other OS readily at my
disposal.

Bob
 
M

Mick Doherty

That line is part of the XP Visual Styles. Turn off Visual Styles and the
line dissapears.

To get rid of the line you will need to override WndProc and handle the
WM_NCPAINT message, which is probably a lot more work than you want to do.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


Bob Dankert said:
As a follow-up to my previous message, this behavior did not occur in
Windows 2003 SBS. Unfortunately, that is the only other OS readily at my
disposal.

Bob

"Jeffrey Tan[MSFT]" said:
Hi Bob,

Thanks for your post!!

Based on my understanding, you want to get rid of the 1px white line
between ToolBar and MainMenu.

On my side, after setting ToolBar.Divider property to false, this white
line will go away. I am using WindowsXP SP2, VS.net2003, .Net
Framework1.1
sp1.

I have also attached my sample project in this reply. You may try it on
your side(You may get it through Outlook Express). Thanks
==========================================
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to
be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no
rights.
 
J

Jeffrey Tan[MSFT]

Hi Bob,

Thanks for your feedback!!

Yes, after enabling the Visual Effect of my OS, I can reproduce out the
issue on my side.

After doing some searching in internal database, I found that this is a
known issue, which is caused by the WindowsXP OS, not .Net WinForm.
Currently, we can not find any good workaround for this issue. But I think
this should not be a critical problem on your product, yes? Anyway, if you
have any further concern, please feel free to feedback. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top