Form is different size in other computers...

Hello guys.

I have a form that displays well on my computers, and on many differnet ones I tried (using Win2K, XP, and other OSs). I have a customer that on her computer it doesn't display good. She is using XP Pro (but I tested on 2 different XP Pro computers and it worked fine).

The thing is that the form is not sized correctly. First I thought it was with the "Height" value (I was changing this value in run-time) and after someone helped I changed it to ClientHeight. But this didn't fix it. I got her to do a screen capture, and I put on the web two files - the same form on my computer and on hers -

It seems that the form is simply smaller, or less things can be in the form. What am I to do? what can be the cause of this???

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


procedure TForm1.FormCreate(Sender: TObject);
Form1.AutoSize:= True;


Set the AutoSize on the form properties value to True

Thx Karamja
merteroAuthor Commented:
Hello Karamja.

This is a good idea. I still need lot's of work to do (because I'm playing with differnet panels, of differnet sizes) but I think this will solve it. I'll compile and send to my client, w'ell see if it is fixed.

I guess we should never use height/width and only use AutoSize, no? why is this happening???



Put Form1.scaled to false, it is true by default.

JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

merteroAuthor Commented:
The scale offer is interesting. Isn't putting it to "false" actually mess my form even more? scale sounds good!

You'll possibly recreate the problem on your own machine if you set it to use 'large fonts' (Control panel/Display/Appearance, I think).

If you want all forms to be identical (and ignore the large fonts setting), set Scaled to false, and use a 'Height' for the font size EVERYWHERE, instead of a 'Size'

(So, have a positive height and negative size. The default is a negative height and positive size!)
it could be the resolution of the computers so u may want to check this
>> what can be the cause of this???
Like I posted in your previous question
>  Display Settings like Large Fonts etc. can change the size of components that depend on text.

>> What am I to do?
What I would do is "calculate" the client height at runtime, not just set it to some constant.
I mean your panel containing "Time Till Next Reminder" is the bottom most component. So, you could set the form's client height to

MyForm.CleintHeight := MessagePanel.Top + MessagePanel.Height + 15;
//if 15 is the space you would like to leave at the bottom.

on formshow.

Hope this helps,

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
merteroAuthor Commented:
Snehanshu - This is exactly what I did now, although a little more complicated because I have panels that are on/off depending on view. So I changed the panel sizes, and then set the form to autosize.

This seems to work, I'm still waiting for my client.

The resolution is not the thing I suspect - I checked it under 800X600 all the way to 1280X1024 and she is not using a higher resolution anyway.

>>The resolution is not the thing I suspect
It is not the resolution but the display settings (in the appearence tab) of Windows XP. From the screen shots one can make out that your client has large or extra large font size while yours is not.
Good luck,
merteroAuthor Commented:
Thanks Snehanshu. I was referring to gangsterboss suggestion about resolution, not the fonts thingy.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.