I also see that there is a bordericon set in forms.pas but it is not
possible to override that is it? I dont want to change forms.pas unless I
absolutely have to.
please help this desperate man, and just point me in the right direction.
Thanks!
Andre
>Hi, I have this problem that I want to add a bordericon on a form like the
>Help icon.
The caption bar icons are drawn and maintained by Windows. The VCL has
nothing to do with their apearance, so overriding TCustomForm won't
help you. The BorderIcons property allows you to select which of the
standard buttons are displayed.
To place additional buttons on the caption, you have to handle
non-client messages, such as WM_NCPAINT and WM_NCLBUTTONDOWN, which
are sent when a window needs its non-client area (such as the caption
bar and borders) repainted, and when the user clicks that area.
You can download TCaptionControl from my page (see signature), which
allows you to place custom buttons on the caption bar. Full source is
provided, so you can modify the code to your needs.
---
Yorai Aminov (TeamB)
http://ourworld.compuserve.com/homepages/yaminov
(TeamB cannot answer questions received via email.
To contact me for any other reason remove nospam from my address)
>I also see that there is a bordericon set in forms.pas but it is not
>possible to override that is it? I dont want to change forms.pas unless I
>absolutely have to.
>
In order for you to get another icon up there, you would need to override
the WM_NCPAINT message and actually paint the icon yourself. Thats the only
way to do it.
I think there are some components available which do it, you can check up
one of the Delphi sites for it. Those components would also be trapping the
WM_NCPAINT message of the form, inorder to paint it.
HTH
--
Srinivasa Bhaskara
Agni Software
Home to Hawk Eye - Delphi's first Component Debugger, and other debugging
aids
http://www.agnisoft.com
Yorai Aminov (TeamB) wrote in message
<364aafce....@forums.inprise.com>...
>On Thu, 12 Nov 1998 11:03:08 +0200, "Andre Jacobs"
><an...@ccs-software.co.za> wrote:
...
http://www.opaquesoftware.com/download/delphi4/oxform.exe
Thanks, Brett
Opaque Software
http://www.opaquesoftware.com
Andre Jacobs wrote in message <72e86i$b2...@forums.borland.com>...
>Hi, I have this problem that I want to add a bordericon on a form like the
>Help icon. So obviously I have to derive something from the tcustomform but
>not having ever changed the look of a vcl I dont know how!
>
>I also see that there is a bordericon set in forms.pas but it is not
>possible to override that is it? I dont want to change forms.pas unless I
>absolutely have to.
>