Solved

component sizes on diff. screen res.

Posted on 1998-11-29
4
125 Views
Last Modified: 2010-04-04
my situation:

At home I run Delphi 4 C/S, at school Delphi 3 C/S.

my problem:
When I make a form at home and then load it at school and put a button besides the one I put on at home, it appears much smaller. also the Formx.PixelsPerInch is different. What is the solution for having the same comonentsizes for my project whether or not I work at home or at school?

Thanks
0
Comment
Question by:smitje
  • 2
  • 2
4 Comments
 

Author Comment

by:smitje
ID: 1348531
Edited text of question
0
 
LVL 3

Accepted Solution

by:
williams2 earned 50 total points
ID: 1348532
The solution is at the most simple.

If you like to act upon the screen resolution, you will have to resize every visual control after the Forms OnResize event, defining lenghts in percent.

If you would like to act upon the froms Pizels per inch property, you just need to do this:

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

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowMessage('Pixels per Inch:' +IntToStr(PixelsPerInch));
end;

0
 

Author Comment

by:smitje
ID: 1348533
This doesnt really do what I want, but I guess this is the only way, I now have all Forms to Scaled := False.

0
 
LVL 3

Expert Comment

by:williams2
ID: 1348534
Is it the size of button or form that gives the actual problem when you are dragging a component to the form?

If so, have you tried checking the options on the grid? (Select Tools->Environment Options->Preferences)

regards
Williams
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

828 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