Solved

Large Size (120 DPI)

Posted on 2007-03-17
10
466 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
  • 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
 

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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 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

12 Experts available now in Live!

Get 1:1 Help Now