Solved

Form is different in size from XP and 2000?

Posted on 2003-10-27
14
160 Views
Last Modified: 2010-04-05
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
Comment
Question by:mertero
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +5
14 Comments
 
LVL 2

Expert Comment

by:alsantos
ID: 9626585
Maybe the resolution of Win XP is smaller than 2000.  Do you have certainty about the resolutions ?

alsantos
0
 

Author Comment

by:mertero
ID: 9626729
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
 
LVL 2

Expert Comment

by:alsantos
ID: 9626746
sorry, no ideas. :(
0
Independent Software Vendors: 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!

 
LVL 5

Expert Comment

by:snehanshu
ID: 9626992
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
 
LVL 8

Accepted Solution

by:
gmayo earned 500 total points
ID: 9627204
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
 
LVL 3

Expert Comment

by:ThoseBug
ID: 9627446
are you using the component xpmanifiest..?
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 9631858
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
 

Author Comment

by:mertero
ID: 9632286
Thanks, Stu. I will try it- this seems like a possible solution.

Will keep u updated,

M.
0
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 9632871
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
 
LVL 8

Expert Comment

by:gmayo
ID: 9637101
*Ahem* - I suggested ClientWidth/ClientHeight first!!!

Geoff M.
0
 

Author Comment

by:mertero
ID: 9639750
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
 
LVL 12

Expert Comment

by:Lee_Nover
ID: 9639795
yes you split points or create a new topic like: points for Stuart
0
 

Author Comment

by:mertero
ID: 9639998
HMmm... is it too late now? how do I split points?

R.
0
 

Expert Comment

by:Karamja
ID: 9723974
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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month7 days, 8 hours left to enroll

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question