• 0

[VB.NET] Controls outside of window client area?


Question

Hello everyone,

I want to put a toolbar over the window frame like in Microsoft Word 2007. It also would be nice to center the titlebar text, but that is not a priority. If I move the titlebar programmatically outside the client area, it dissapears, as expected. The mouse events don't work either. I have seen this done in an example, but I can't find the example anywhere. Thanks ahead of time!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You have to ask the system to allow non-client drawing first, then you can draw whatever you want in the titlebar area (and recieve mouse events and such)

http://msdn.microsoft.com/en-us/library/aa...28VS.85%29.aspx

Then you have to handle the paint message for the non-client area, which is WM_NCPAINT I think, you can hook the messages in .NET

Or you can use one of the pre-made ribbon controls that will put one of those mini-toolbars into the non-client area.

Link to comment
Share on other sites

  • 0

I decided to instead extend the glass area down into the form, so that the titlebar text behaves correctly. Is there a way to reassign the titlebar area known to windows so that I can drag the form and get the context menu when clicking into the extended glass?

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.