Solved

component sizes on diff. screen res.

Posted on 1998-11-29
4
126 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
[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
  • 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

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!

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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