1 (edited by Just4Fun 2025-08-19 17:45:26)

Topic: Display Screen Scaling Regardless of Resolution

Screen scaling in MVDB is something that’s tripped me up more times than I care to admit.
I hope this Screen Scale is a starting point for anyone struggling with UI scaling across resolutions.
Feel free to use it, tweak it, break it, rebuild it — whatever suits your project.
If you make improvements, or build other functions I’d love it if you shared them back on the forum so others can benefit too.
The more we share, the better we get.

Post's attachments

Attachment icon Screen To Scale - V1.0.zip 550.8 kb, 39 downloads since 2025-08-19 

Re: Display Screen Scaling Regardless of Resolution

Hi,


The program has the following properties:

Screen.FormCount - number of forms
Screen.Forms[i] - access a form (TForm) by index

Using these properties, instead of an array, you can update both your own and some system MVD forms (export, import, users ...) without having to manually enter all the forms.

Screen.pixelsperinch - find out the scale set in the system (scale 100% = 96). Can be used in combination with ScaleBy .

If you use access control and password login, you can use

begin
frmdbCoreLogin.ScaleBy(... , ...)
end.

to scale the login window.