Solved

Form is different in size from XP and 2000?

Posted on 2003-10-27
14
157 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
  • 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
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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 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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 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