5

Possible Duplicate:
Non client painting on aero glass window

I want to have a button like Skype's compact-view button on the title bar. How can I do that?

For example:

Vista-style title bar with an extra button to the left of the minimize button

Community
  • 1
  • 1
Rakesh Devarasetti
  • 1,409
  • 2
  • 24
  • 42
  • 1
    I voted this up, because I think this is a valid question. Voted your other question down though, because you posted the same question twice. – jpfollenius Oct 17 '11 at 07:40
  • 1
    A very good resource for this kind of task is Chris Rolliston's series of blog posts: http://delphihaven.wordpress.com/2010/04/19/setting-up-a-custom-titlebar/ and http://delphihaven.wordpress.com/2010/04/22/setting-up-a-custom-title-bar-reprise/ – David Heffernan Oct 17 '11 at 08:23
  • @David Heffernan good find! Voted to close – jpfollenius Oct 17 '11 at 08:24
  • 1
    I believe this is a non-duplicate because it asks for a "button", not "how to paint in non client area". From that, it seems the OP does not want to handle painting code himself, so he wants a "button" control of some kind. – Warren P Oct 17 '11 at 15:55

1 Answers1

6

You can use the JvCaptionButton which comes free in the very-nice-but-very-large open-source free JVCL library. It is a general purpose "caption button". Caveat: The appearance is not purely native and not Windows-7-aero-themed.

This button does not decide what to take out of your app, you would have to write the code to make the form go into compact mode, and you could click this caption-bar button, and write the code in its OnClick Event.

enter image description here

At runtime:

enter image description here

Warren P
  • 65,725
  • 40
  • 181
  • 316