QurbanDurrani
asked on
Large Size (120 DPI)
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.
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.
ASKER
Mokule,
The parent font for these controls and the form itself is set to false. Still Same problem.
The parent font for these controls and the form itself is set to false. Still Same problem.
try to set font size for the controls this way
var
DesiredSize: integer;
begin
DesiredSize := 8;
Button1.Font.Size := MulDiv(DesiredSize,96,Pixe lsPerInch) ;
var
DesiredSize: integer;
begin
DesiredSize := 8;
Button1.Font.Size := MulDiv(DesiredSize,96,Pixe
ASKER
Mokule,
Yes I have set the parent font for both the control and the form that contains them to false, but still same problem.
Yes I have set the parent font for both the control and the form that contains them to false, but still same problem.
Yes, but what about my another suggestion?
ASKER
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,Pixe lsPerInch) ;
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,Pixe
What are you font name?
try with
Button1.Font.Name := 'Arial';
try with
Button1.Font.Name := 'Arial';
ASKER
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works. Thanks for your help.
ParentFont := False;
for these controls?