component sizes on diff. screen res.

Posted on 1998-11-29
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?

Question by:smitje
  • 2
  • 2

Author Comment

ID: 1348531
Edited text of question

Accepted Solution

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);
  Scaled:= True;

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


Author Comment

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.


Expert Comment

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)


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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 this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: (…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

20 Experts available now in Live!

Get 1:1 Help Now