[Lazarus] Cannot close Windows 10 application with a bkClose TBitBtn button...

Bo Berglund bo.berglund at gmail.com
Mon Nov 16 15:06:43 CET 2020

On Mon, 16 Nov 2020 13:04:04 +0100, Bart via lazarus
<lazarus at lists.lazarus-ide.org> wrote:

>On Mon, Nov 16, 2020 at 11:43 AM Bo Berglund via lazarus
><lazarus at lists.lazarus-ide.org> wrote:
>> I create a new application and place a TBitBtn on a panel at the
>> bottom of the main form. I set the Kind property to bkClose.
>> Now I expect the application to close when I click this button, like
>> it does on Delphi for the same type of button.
>IIRC then having a button with a ModalResult on the application's main
>form in Delphi does not close that form.
>In Lazarus it did in the past, but this was changed (long time ago),
>to be consistent with Delphi behaviour.

If I place for instance a ShowMessage() call in the OnClick event of
the button it DOES NOT show up!
And if I place a breakpoint there it too does not break.

So somehow this business of setting the form transparent robs it of
any mouse event too...
Even if the control clicked on is in fact not transparent.

Bo Berglund
Developer in Sweden

More information about the lazarus mailing list