Solved

Form is different in size from XP and 2000?

Posted on 2003-10-27
14
158 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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intraweb download file link ? 1 168
Downloading email attachments 2 85
How to define IfThen functions in one common unit? 4 64
How to make Sign in, using Clientdataset? 1 33
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

726 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