Solved

component sizes on diff. screen res.

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
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.

762 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