Solved

Form is different in size from XP and 2000?

Posted on 2003-10-27
14
155 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
Comment Utility
Maybe the resolution of Win XP is smaller than 2000.  Do you have certainty about the resolutions ?

alsantos
0
 

Author Comment

by:mertero
Comment Utility
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
Comment Utility
sorry, no ideas. :(
0
 
LVL 5

Expert Comment

by:snehanshu
Comment Utility
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
Comment Utility
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
Comment Utility
are you using the component xpmanifiest..?
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
Comment Utility
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:mertero
Comment Utility
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
Comment Utility
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
Comment Utility
*Ahem* - I suggested ClientWidth/ClientHeight first!!!

Geoff M.
0
 

Author Comment

by:mertero
Comment Utility
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
Comment Utility
yes you split points or create a new topic like: points for Stuart
0
 

Author Comment

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

R.
0
 

Expert Comment

by:Karamja
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now