We help IT Professionals succeed at work.

screen height?

jexd99
jexd99 asked
on
Medium Priority
336 Views
Last Modified: 2010-04-04
There must be a simple way (?) to get the screen height (not my application window, but the actual screen height).  For example, I know my screen height is "480", but I shouldn't have to hard code this. Anyone know the answer to this?
          Thanks a bunch,
                  jexd99@aol.com
Comment
Watch Question

procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage('width is '+InttoStr(GetSystemMetrics(SM_CXSCREEN)));
showmessage('height is '+InttoStr(GetSystemMetrics(SM_CYSCREEN)));
end;

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
I suppose "height" is referring to height in pixels.
In that case look at the TScreen object.
Screen.Height and Screen.Width will give you the desired information

Author

Commented:
Thanks for the info.  I figured Delphi had a fairly simple way
of accessing it, but sometimes the easiest things are the
hardest to find !! :)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.