Recent

Author Topic: borderless form: Delphi vs. Lazarus  (Read 3317 times)

kirchfritz

  • Jr. Member
  • **
  • Posts: 71
  • WIN11 LAZ 2.2.4 FPC 3.2.2
borderless form: Delphi vs. Lazarus
« on: July 05, 2021, 04:41:08 pm »
Hi,
after studying a wonderful article about creating borderless forms with delphi 
https://medium.com/@vuio/delphi-borderless-form-a2538e3ec48
I tried to translate the delphi source code to Lazarus/Freepascal source code.
My translation (see my attachement) was succesful, but my Lazarus program doesn't hide the form's captionbar.

Can anybody explain why my Lazarus program never received the WM_NCCALCSIZE message?

Fritz


jamie

  • Hero Member
  • *****
  • Posts: 7695
Re: borderless form: Delphi vs. Lazarus
« Reply #1 on: July 05, 2021, 04:50:28 pm »
the LCL does not pass all messages along to the form, only the most common ones, those that are supported cross platform wise..
 
  You need to hook the window procedure for that or use a Hook Lib that I have somewhere around here to make it easier.

The only true wisdom is knowing you know nothing

kirchfritz

  • Jr. Member
  • **
  • Posts: 71
  • WIN11 LAZ 2.2.4 FPC 3.2.2
Re: borderless form: Delphi vs. Lazarus
« Reply #2 on: July 07, 2021, 06:45:18 pm »
I am not familiar with hooking the windows procedure.
Can anybody help me?

jamie

  • Hero Member
  • *****
  • Posts: 7695
Re: borderless form: Delphi vs. Lazarus
« Reply #3 on: July 07, 2021, 07:03:03 pm »
I've already posted this before, just searched the forums and couldn't find it..
so here is a demo and unit file of how to use it.
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018