Solved

Large Size (120 DPI)

Posted on 2007-03-17
10
472 Views
Last Modified: 2010-04-05
My Application is designed in Normal Size(96 DPI). But when it is run under Large Size(120 DPI), It has problems. I can set the Scaled property of a form to False, which prevents it from being resized, but the writing on different controls on the form gets enlarged.
1) How do I make the writings on the controls(for example buttons) stay the same?
2)  There is a PageControl on the main form with 11 tab sheets. How do I prevent them from getting onto two lines and staying the same size.
0
Comment
Question by:QurbanDurrani
[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
  • 5
  • 5
10 Comments
 
LVL 17

Expert Comment

by:mokule
ID: 18742059
Have You tried to set
ParentFont := False;
for these controls?
0
 

Author Comment

by:QurbanDurrani
ID: 18742605
Mokule,
The parent font for these controls and the form itself is set to false. Still Same problem.
0
 
LVL 17

Expert Comment

by:mokule
ID: 18743030
try to set font size for the controls this way

var
  DesiredSize: integer;
begin
  DesiredSize := 8;
  Button1.Font.Size := MulDiv(DesiredSize,96,PixelsPerInch);
0
Industry Leaders: 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!

 

Author Comment

by:QurbanDurrani
ID: 18744308
Mokule,
Yes I have set the parent font for both the control and the form that contains them to false, but still same problem.
0
 
LVL 17

Expert Comment

by:mokule
ID: 18744455
Yes, but what about my another suggestion?
0
 

Author Comment

by:QurbanDurrani
ID: 18745056
Mokule,
I tried putting the code as shown below in both the 'formcreate' and the 'formshow' procedures, but neither fixed the problem.
var
DesiredSize: integer;
begin
DesiredSize := 8;
  P1TypeLabel.Font.Size := MulDiv(DesiredSize,96,PixelsPerInch);
0
 
LVL 17

Expert Comment

by:mokule
ID: 18745148
What are you font name?
try with
  Button1.Font.Name := 'Arial';
0
 

Author Comment

by:QurbanDurrani
ID: 18745406
The font name is 'MS Sans Serif'
Changing it to 'Arial' in code did the trick.
Why did it not work with 'MS Sans Serif'?
How do I check to see if DPI setting is 120 (or not 96) before I change the name and size?
Thanks for your help so far, it got me much further than I was.
0
 
LVL 17

Accepted Solution

by:
mokule earned 500 total points
ID: 18745646
It doesn't work with 'MS Sans Serif' because it's not true type font.
It's harder to achieve scaling not true type fonts.
They have only limited sizes values.
Look into Fonts Folder in Control Panal to see the difference between these fonts.

You should read PixelsPerInch property to verify DPI
0
 

Author Comment

by:QurbanDurrani
ID: 18749941
It works. Thanks for your help.
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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
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…

717 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