Quantcast
Channel: Planet Object Pascal
Viewing all articles
Browse latest Browse all 1725

Daniel Magin's Logfile: FMX XE4 Update 1 Form Event onActivate Problem unofficial fix

$
0
0

After installing XE4 Update 1 a small problem added on the Firemonkey Form Event onActivate.

The Event onActivate is not fired correctly anymore. See also my QC Report and also a other QC Report on the Embarcadero Website.

http://qc.embarcadero.com/wc/qcmain.aspx?d=116841

http://qc.embarcadero.com/wc/qcmain.aspx?d=116717

After analyzing the changes in the FMX Sources i found the problem and i fixed it.

Patching FMX.Forms.pas works now fine with Update 1

procedure TCommonCustomForm.Show; var ScreenService: IFMXScreenService; begin if not (csDesigning in ComponentState) and TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenService)) then begin case FPosition of TFormPosition.poScreenCenter: SetBounds(System.Round((ScreenService.GetScreenSize.X - Width) / 2), System.Round((ScreenService.GetScreenSize.Y - Height) / 2), Width, Height); end; end; if FFullScreen then begin SetFullScreen(True); FFullScreen := False; end ;  FVisible := True; // Add line as in XE4 before Update 1 FWinService.ShowWindow(Self); // FVisible := True; remove this line DoShow; end;

Now onActivate works fine


Viewing all articles
Browse latest Browse all 1725

Trending Articles