Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Large Size (120 DPI)

Posted on 2007-03-17
10
Medium Priority
?
474 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
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.

 

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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

618 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