Solved

component sizes on diff. screen res.

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month5 days, 20 hours left to enroll

626 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