Title Bar

G

Guest

I wish to replace the tile bar with my own code which will have its own max
min buttons etc, but wish to still keep the Border style, if I set the
FormBorderStyle property ot none I loose the border of the window, and all
the oterh option always provide some sort of title bar.

Any Ideas.
Thanks
 
S

Stoitcho Goutsev \(100\)

Cairn,

Title bar is part of the non client windows area, which is not supported in
windows forms. To do anything there you need to handle WM_NC* messages e.g.
WM_NCPAINT. I don't think it will be easy and I also don't think yuo can
getaway without using PInvoke and Win32 API.

I think the easies would be to create one captionless form and add a panel
docked Top that is going to be your new caption. Add all the buttons you
want there. Handle WM_NCHITTEST to allow dragging the windows arround (there
a lot of examples in the ng how to do this).
Don't forget to change the color of the caption depending on whether the
application is active or not.
 

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