troubleshooting Question

scaling forms to different resolutions.

Avatar of scoopbh
scoopbh asked on
Delphi
5 Comments3 Solutions1646 ViewsLast Modified:
Hi,

I'm using something like this to change my forms regarding the user's resolutions:

  Form9.scaled := true;
  x := getSystemMetrics(SM_CXSCREEN);
  y := getSystemMetrics(SM_CYSCREEN);
  if (x <> ScreenHeight) or (y <> ScreenWidth) then
  begin
    Form9.height := Form9.height * x DIV ScreenHeight;
    Form9.width := Form9.width * y DIV ScreenWidth;
    scaleBy(x, ScreenHeight);
  end;

It's work very well for normal resoulutions (like 800x600, 1024 x 768 etc). But under resolution in widescreens or something like 960x 600 it doesn't work, cutting some parts of the screen.

Any idea how to solve this?

ASKER CERTIFIED SOLUTION
bernani

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros