okemoto
asked on
Auto resizing forms component
Anybody can provide me with a freeware component that will autosize the forms under different screen resolutions?
It's really simple to make a thing like this. You get the original screen resolution and your form sizes, and then calculate it this way:
rateX := OldResolutionX/getdeviceca ps(GetWind owDC(GetDe skTopWindo w), LOGPIXELSX);
rateY := OldResolutionY/getdeviceca ps(GetWind owDC(GetDe skTopWindo w), LOGPIXELSY);
NewWidth := OldWidth*rateX;
NewHeight := OldHeight*rateY;
-It calculates the proportion of the old resolution and the new. This way you can resize all controls on your form to look the same as in the original screen resolution.
Sorry, but I didn't find a component. I remember that there are such component though, but where are they when you need them?!!
rateX := OldResolutionX/getdeviceca
rateY := OldResolutionY/getdeviceca
NewWidth := OldWidth*rateX;
NewHeight := OldHeight*rateY;
-It calculates the proportion of the old resolution and the new. This way you can resize all controls on your form to look the same as in the original screen resolution.
Sorry, but I didn't find a component. I remember that there are such component though, but where are they when you need them?!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In the form's create just add:
with Screen do SetBounds( 0, 0, Width, Height );
/// John