?
Solved

Large Size (120 DPI)

Posted on 2007-03-17
10
Medium Priority
?
473 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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: …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

752 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