Zoom of a form lazarus / 31-LCL ---------------------------------------------------------------------- luca · 2020-08-24 15:07 I'd like to implement a form that can zoom its contents. Something like the scale factor in Firemonkey app. Do you know if it's possible in Lazarus? Regards Luca ---------------------------------------------------------------------- Handoko · 2020-08-24 15:12 I never try Firemonkey. But I know Lazarus can do such thing. On the link below go to User Interface category then click the Scaling a Form demo: https://wiki.freepascal.org/Portal:HowTo_Demos Unfortunately it did not work correctly on Lazarus 1.8.0, not sure if the bug has been already fixed or not. ---------------------------------------------------------------------- luca · 2020-08-24 15:24 Hi, Firemonkey is implemented in Delphi as an alternative to VCL applications. Your solution it's ok for graphical elements but is not exactly what I'm looking for; I'd like to have something similar to CTRL + {+/-} zooming function in a browser: controls, fonts and all graphical elements are reduced maintaing the rigth proportions. My idea is to have a sort of ScalingPanel to implement this feature. Regards Luca ---------------------------------------------------------------------- winni · 2020-08-24 15:36 Hi! A demo with the BGRA library. I use it because it makes good images if you zoom in. You can download the BGRAbitmapPack from the Online Package Manager. Take a Form, an Image and a Button. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  uses ...., BGRABitmap, BGRADefaultBitmap, BGRABitmapTypes;  procedure TForm1.Button1Click(Sender: TObject);var R, small : Trect;    bmp: TBGRABitmap;beginImage1.Canvas.brush.color := clWhite;Image1.Canvas.fillrect (0,0,Image1.width, Image1.Height); bmp := TBGRAbitmap.create;bmp.LoadFromDevice(Form1.Canvas.Handle);small := Rect(50,50,50+bmp.width div 2, 50+bmp.height div 2);BGRAReplace(bmp,bmp.GetPart(small));BGRAReplace (bmp,bmp.Resample(bmp.width * 2, bmp.Height * 2) );R := Rect(0,0,bmp.width, bmp.height);Image1.Canvas.CopyRect (R,bmp.canvas,R);bmp.free;end;                             We copy the canvas of Form1 into bmp. Then we  take a part of the image starting at 50/50. Now we resize it to the double size. And finally we draw it on the Image.canvas. Winni ---------------------------------------------------------------------- jamie · 2020-08-24 16:12 That reminds me..  The little ICON MS uses when you click your middle button over the Web browser, it gives you a different cursor,.. If I was to use that cursor would I expect to have a failing app on older OSes ? nothing less than W2k/Xp or course. ---------------------------------------------------------------------- Handoko · 2020-08-24 16:45 Quote from: luca on August 24, 2020, 05:24:30 pmMy idea is to have a sort of ScalingPanel to implement this feature. I'm not sure but maybe you can try TFrame: https://wiki.freepascal.org/Frames TFrame is a kind of form that can be inserted into a form, and it has scale feature.