Recent

Author Topic: how to utilize customize form caption row  (Read 2595 times)

Aruna

  • Hero Member
  • *****
  • Posts: 808
Re: how to utilize customize form caption row
« Reply #15 on: September 06, 2024, 05:03:38 am »
I would like to utilize form caption row .

I mean I would like to customize caption of the form .

I have attached the screens  .

if anyone know . please guide me
Hello @Prakash have a look at the attached screenshot. The attached zip has the code. It has a custom form caption, you can drag the window by dragging on the caption. If you click the window close button (usually represented by "X") it will close the window and, terminate the application.The 'File' and 'Master' you have shown in your image I have used labels if you require click functionality there are so many ways to implement it. Hope this helps. :-)

kirchfritz

  • Jr. Member
  • **
  • Posts: 76
  • WIN11 LAZ 4.2 FPC 3.2.2
Re: how to utilize customize form caption row
« Reply #16 on: September 06, 2024, 10:53:57 am »
Hello @Prakash, have a look at the attached screenshot. the attached zip has the code.
The borderless form has a custom caption and you can drag the window by dragging on the caption.
- Minimize, Maximize, Restore, Close buttons are available.
- Doubleclick on the caption maximizes/restores the window.
- A system menu is simulated.
- custom drawn borderlines are used to resize the window.
- application uses BGRA-controls!!
- application is tested on WIN11 only

kirchfritz

  • Jr. Member
  • **
  • Posts: 76
  • WIN11 LAZ 4.2 FPC 3.2.2
Re: how to utilize customize form caption row
« Reply #17 on: June 01, 2026, 01:51:50 pm »
Who knows how to build a captionless, resizeable win11-form with Lazarus looking like my appended picture?
The problem ist not the caption bar itself.
The problem is the border with its shadow, the rounded corners and resizing the form.
« Last Edit: June 01, 2026, 01:54:59 pm by kirchfritz »

Xenno

  • Full Member
  • ***
  • Posts: 111
    • BS Programs
Re: how to utilize customize form caption row
« Reply #18 on: June 01, 2026, 05:55:17 pm »
For Windows: WM_NCCALCSIZE
It needs to be handled with custom WndProc.

You may want to take look at my small apps for showcase.
Lazarus 4.0, Windows 10, https://www.youtube.com/@bsprograms

kirchfritz

  • Jr. Member
  • **
  • Posts: 76
  • WIN11 LAZ 4.2 FPC 3.2.2
Re: how to utilize customize form caption row
« Reply #19 on: June 01, 2026, 08:06:27 pm »
Thank you Xenno for your quick response, but I asked for a Lazarus WIN-11 form with rounded corners.
your small apps only show me a delphi-application without rounded corners. (see appendix)
Or do you have other small apps than "3 Steps to Create Applications with our own DIY custom title bar using Delphi"?

Xenno

  • Full Member
  • ***
  • Posts: 111
    • BS Programs
Re: how to utilize customize form caption row
« Reply #20 on: June 01, 2026, 08:17:14 pm »
I don't have Win 11. I am sorry. I hope that rounded comes the Win 11 and automatically affects the appearance of any application built with win32 widgetset.

That video you refer is indeed in Delphi. But, my small (Windows desktop) apps are all built with Lazarus. Please, visit this webpage: https://sites.google.com/site/bsprograms/the-programs.
Lazarus 4.0, Windows 10, https://www.youtube.com/@bsprograms

 

TinyPortal © 2005-2018