Re: Title Bar by Stoitcho
Stoitcho
Mon Apr 10 08:29:02 CDT 2006
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.
--
HTH
Stoitcho Goutsev (100)
"Cairn" <Cairn@discussions.microsoft.com> wrote in message
news:2AD586F3-8186-4B1E-B315-3DBEFB2678A8@microsoft.com...
>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