Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Left := 0;
Top := 0;
Width := VCL.Forms.Screen.DesktopWidth; // MONITOR RESOLUTION: X
Height := VCL.Forms.Screen.DesktopHeight; // MONITOR RESOLUTION: Y
But in practice this
How i can fix this? P.S.FMX Application (VCL.Forms uses only for get monitor resolution).
If your monitor uses high DPI I would suggest that you set it to 100% (96 DPI) while you develop the first versions of the web browser. Once you have everything working then set the resolution to the original DPI value to fix the high DPI issues in the last step.
How can this help me with my problem?
Since the browser when showing is shifted by X, Y coordinates (they must be 0, 0) My monitor: 1600x900 (VCL.Forms.Screen.DesktopWidth and VCL.Forms.Screen.DesktopHeight too 1600 and 900), and DPI set always default 100% (96 DPI).
That procedure sets the size and position of TFMXWindowParent using the TRect returned by TSimpleFMXBrowserFrm.GetFMXWindowParentRect.
Notice that GetFMXWindowParentRect uses the FMXChromium1.ScreenScale value to calculate the position of TFMXWindowParent and FMXChromium1.ScreenScale is calculated based on the monitor DPI value.
begin
if (FMXWindowParent = nil) then
begin
FMXWindowParent := TFMXWindowParent.CreateNew(nil);
FMXWindowParent.Position := TFormPosition.Designed; // <--
FMXWindowParent.Reparent(Handle);
ResizeChild;
FMXWindowParent.Show;
end;
end;