PDA

View Full Version : DPI of 120 and Delphi 6 & 7



Wizard
15-01-2010, 08:15 AM
Hi all. Recently my eyes got very tired at trying to read small text on my Sony laptop with its 13.3 inch display. I then changed the DPI to 120 (Running Vista) and it's much better.

The problem that I'm having is with Delphi 6 & 7, all the forms suddenly has scroll bars for width and height and the forms' color looks like windows basic color. So it would seem that these versions of Delphi doesn't support a larger DPI setting.

Is there a workaround, has anyone experienced the same thing?

Edit: Found the following code on the net but it doesn't seem to do anything >:(

procedure TForm1.FormCreate(Sender: TObject);
begin
Assert(not Scaled, 'TForm.Scaled property sucks, you should set it to False!');
if Screen.PixelsPerInch <> PixelsPerInch then
begin
ScaleBy(Screen.PixelsPerInch, PixelsPerInch);
end;
end;

czar
17-01-2010, 06:18 PM
set the form.scaled := false;

However, for existing projects you will first need to set scaled to false on a computer with normal sized fonts.

Wizard
18-01-2010, 08:36 AM
However, for existing projects you will first need to set scaled to false on a computer with normal sized fonts.

Wow, thanks so much, it works!! ;D

User137
18-01-2010, 01:43 PM
You can also disable horizontal and vertical scrollbars on all forms. It is in most cases just annoying feature.