It does not call an OnShow event if the form is maximized
- Lazarus/FPC Version: 2.3.0 (rev main-2_3-2493-gd298e33d) FPC 3.2.3 i386-win32-win32/win64
- Operating System: Windows 10 x64
- CPU / Bitness: 32
What happens
It does not call an OnShow event if the form is maximized and Form:
top: -8
left: -8
width: Screen.Width
height: Screen.WorkAreaHeight-GetSystemMetrics(SM_CYCAPTION);
such settings are saved for the maximized form in *PropStorage
Steps to reproduce
Create new application with OnCreate and OnShow events:
uses
LCLIntf, LCLType;
procedure TForm1.FormCreate(Sender: TObject);
begin
Top := -8;
Left := -8;
Width := Screen.Width;
Height := Screen.WorkAreaHeight-GetSystemMetrics(SM_CYCAPTION);
Windowstate := wsMaximized;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
ShowMessage('OnShow');
end;
There has been a similar problem before ( #37647 (closed) ) and it was solved, but it has appeared again - I can't tell from which commit