0

When I run my application on a monitor with a smaller screen resolution, the application simply cuts any components that were placed 'over the edge' instead of simply re-sizing the form to a size that is fully visible under the different resolution. Is there a simple way to force all the forms to be re-sized under any different resolution ?

Thanks for any help.

gweno10
  • 365
  • 1
  • 5
  • 16
  • 2
    This takes some effort on your part. You need to decide how to handle this. For a start, VCL or FMX? – David Heffernan Oct 24 '14 at 16:57
  • If it's VCL, look at this question: http://stackoverflow.com/questions/8296784/how-do-i-make-my-gui-behave-well-when-windows-font-scaling-is-greater-than-100 - Personally I use a variant of Ian Boyd's answer. – Graymatter Oct 24 '14 at 20:42
  • @Gray The answers there deal with a different problem. There we consider different font preferences. Here we consider different screen sizes. – David Heffernan Oct 25 '14 at 06:56
  • @DavidHeffernan Ahh, I see now. That said, Ian's code can be just as easily used to scale an entire form (`ScaleForm` method) to an appropriate size. The OP just needs to work out whether to scale by the width or the height and then call `ScaleForm(XXX, NewWidth/NewHeight, OldWidth/OldHeight)`. – Graymatter Oct 25 '14 at 07:04
  • @Gray Scaling the entire form won't do what is needed. For instance if the form has a memo then you might shrink that memo. But you'd want to leave the labels and text using the same font. – David Heffernan Oct 25 '14 at 07:06
  • @DavidHeffernan We definitely need more info from the OP then. Resizing could mean scaling or it could mean what you have described which is more like the DevEx layout manager (https://www.devexpress.com/Products/VCL/ExLayoutControl/). It might even be something as simple as a couple of anchors and resizing the form. – Graymatter Oct 25 '14 at 08:11
  • @Graymatter Exactly. It's going to be something along those lines. Quite what is best depends on the content. – David Heffernan Oct 25 '14 at 08:13
  • I want to scale the form to a specific size for each specific resolution. What would be the best and most efficient way of doing this ? – gweno10 Oct 29 '14 at 20:53

0 Answers0