FMX form doesn’t minimize by taskbar click; animation doesnt work


There are 2, or even 3 question:

1) When I click the application’s taskbar icon, the form doesn’t minize unlike a VCL application
Digging into FMX.Platform.Win WndProc I found these lines probably causing the issue (as I understand this code cause the app to restore back immediatelly as I minimize it)

Result := DefWindowProc(hwnd, uMsg, wParam, lParam);
if BOOL(wParam) then

2) When I click form’s minimize button, sometimes the form minimezes to desktop:


procedure TPlatformWin.MinimizeApp;
Application.MainForm.WindowState := TWindowState.wsMinimized;

seems solves the issue

3) The issue from this question How to properly restore an FMX form? is still actual in 10.2

Given answer to patch TPlatformWin.CreateAppHandle I dont understand: changing GetDesktopWindow to 0 doesn’t change anything, deleting important code as that answer suggests seems pointless

Comments are closed.