Search code examples
delphidelphi-2010

Is it possible to add a custom button to a TForm caption near the minimize, maximize, and close buttons at runtime?


Possible Duplicate:
Resources for Windows Aero Glass and Compositing (DWM)
Insert button into window title bar

I am Using Delphi 2010.

I was wondering if there was a way to add a custom button to the left of the minimize, maximize, and close buttons. A button that has a onClick event assigned to it?

This would be used on both modal and non-modal forms.

Thanx!


Solution

  • For forms with aero disabled or when your system run in Windows XP you can use the TJvCaptionButton (part of the JVCL) component, otherwise you must draw the button in the non client area using the DWM (Desktop Window Manager ) functions. Try these articles for an example.