02 Votes

Delphi/Lazarus: Determine Screen Resolution

Question by Guest | 2015-03-20 at 15:24

I would like to detect the resolution of the screen from within my application in order to rearrange the content of my program to this size.

You should also know the display of monitor resolution when providing a full screen mode in your app.

Is there any possibility to retrieve width and height (in pixel) of the screen?

ReplyPositiveNegative
1Best Answer1 Vote

You can just use TScreen, that should be automatically available in your program. Apart from other things, TScreen is providing the properties Width and Height:

var
  h, w: integer;
begin
  h := Screen.Height;
  w := Screen.Width;
end;

Using this code, you are storing the resolution of your screen into the variables h and w.
2015-03-21 at 17:39

ReplyPositive Negative
Reply

Related Topics

Android Splash Screen Tutorial

Tutorial | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.