delphi - How to properly restore an FMX form? -
delphi - How to properly restore an FMX form? -
minimizing fmx form menu bar button , restoring clicking on task bar icon bring form foreground, not activate window. form minimized "directly" rather applying animation "shrinks" window taskbar. forms onactivate event not fired.
curiously, if patch windowproc , phone call showwindow sw_restore upon deactivation form restored after clicking taskbar icon. i'm not sure why. minimize animation still not fired though.
procedure tform1.windowproc(var msg: tmessage); begin case msg.msg of wm_activate: if (msg.wparamlo = wa_inactive) showwindow(windowhandletoplatform(handle).wnd, sw_restore); end; msg.result := callwindowproc(orgwndproc, windowhandletoplatform(handle).wnd, msg.msg, msg.wparam, msg.lparam); end;
i can observe behavior blank fmx hd form on windows 8. seems obvious bug me, there improve way work around ?
i think got around modifying fmx.platform.win.pas file. in tplatformwin.createapphandle method need comment (or remove) lines:
fapplicationhwnd := createwindowex(ws_ex_windowedge or ws_ex_appwindow, fmappclass.lpszclassname, pchar(lapplicationtitle), ws_popup or ws_group, 0, 0, 0, 0, getdesktopwindow, 0, hinstance, nil); winapi.windows.showwindow(fapplicationhwnd, sw_shownormal);
i think solution came embarcadero give-and-take forums. message gone, give link anyway in case comes back: https://forums.codegear.com/thread.jspa?messageid=556541򇷽
delphi firemonkey delphi-xe5
Comments
Post a Comment