Form misaligning in high resolution

1
My form is misaligning when the application runs on a monitor with a higher resolution than mine, the borderstyle is in bsnone and still it still misaligned, I also set all property anchors to false .

    
asked by anonymous 20.07.2015 / 19:01

1 answer

1

Hello, MrHelp. I have the problem with resolutions below 1024, so I had to resort to re-scaling the screen manually.

The main screen left BorderStyple: = bsSizeable;

Const nTamOriginal = 1280 // resolução da minha tela
var nEsc : Double;
    nInst: ianteger;
if nTamOriginal <> Screen.width then
begin
    nEsc := ( Screen.Width -nTamOriginal ) / nTamOriginal;
    nInt := Round( ( nEsc*100 ) + 100 );
    Self.Width := Round( Self.Width * ( nEsc +1 ) );
    Self.Height:= Round( Self.Height* ( nEsc +1 ) );
    Self.ScaleBy( nInt, 100 );
end;
Self.Top := 0;
Self.Left := 0;

Test your application, by the way, put it in the form's Create.

    
24.07.2015 / 15:06