Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

Form is different in size from XP and 2000?

Hi guys.

I have a small for, nothing special about it. I noticed that the size of the form is different in XP and in 2000. Really different - some part of a component is missing. The XP form is smaller.

Any ideas what casues this and how can I fix it? will screenshots help? I can post these to my site.

Thanks,

Ron
0
mertero
Asked:
mertero
  • 4
  • 2
  • 2
  • +5
1 Solution
 
alsantosCommented:
Maybe the resolution of Win XP is smaller than 2000.  Do you have certainty about the resolutions ?

alsantos
0
 
merteroAuthor Commented:
The resolutions are okay, and anyway it shouldn't cause the form to be smaller (Some of the components are missing/cut!). Height should mean "pixels", anyway!

Any more ideas?
0
 
alsantosCommented:
sorry, no ideas. :(
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
snehanshuCommented:
mertero,
  Display Settings like Large Fonts etc. can change the size of components that depend on text.
  Verify that the screen settings are exactly the same. If XP's resolution is higher than 2000's then it won't matter, but if the resolution is lower, you can face problems.
  So, please check these out.
...Snehanshu
0
 
gmayoCommented:
Screenshots would be useful. Try setting ClientWidth and ClientHeight at runtime (eg in the FormShow). Width and Height seem to take priority over ClientWidth/ClientHeight, as I do have a problem with XP/NT as well.

Geoff M.
0
 
ThoseBugCommented:
are you using the component xpmanifiest..?
0
 
Stuart_JohnsonCommented:
It is ClientWidth/ClientHeight.

When the "Telly Tubbies" look is turned on (large caption bar), you loose form real estate.  Instead of using the Form.Height and Form. Width properties, use the Form.ClientHeight and Form.ClientWidth properties.  This ensures your form stays the size you need.

The default XP theme makes the caption bar about 10 pixels taller than the standard Windows sized caption bar.  So this means your form looses 10 pixels in work area height.

In your FormCreate method, just put the following in there:

  ClientHeight := y;
  ClientWidth := x;

Where X and Y are the values you want to make your height and width.  

Good luck with it!

Stu
0
 
merteroAuthor Commented:
Thanks, Stu. I will try it- this seems like a possible solution.

Will keep u updated,

M.
0
 
Lee_NoverCommented:
titlebar, form borders, main menus and status bars take up space in the client area
they differ from theme to theme .. so as most of the posts suggest use ClientHeight/Width
0
 
gmayoCommented:
*Ahem* - I suggested ClientWidth/ClientHeight first!!!

Geoff M.
0
 
merteroAuthor Commented:
I made the changes to clientheight/width and it seems to be working. Geoff did suggest it first, so I'm giving him the points. But Stu gave a good answer too, is there a way to also credit him?

M.
0
 
Lee_NoverCommented:
yes you split points or create a new topic like: points for Stuart
0
 
merteroAuthor Commented:
HMmm... is it too late now? how do I split points?

R.
0
 
KaramjaCommented:
Hello,

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

Or

Set the AutoSize on the form properties value to True

Thx Karamja
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
  • 2
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now