Computer Science Canada Can you use Windows API to find the screen resolution? |
Author: | HazySmoke)345 [ Mon Nov 21, 2005 7:01 pm ] |
Post subject: | Can you use Windows API to find the screen resolution? |
Yes... I know that the component SysInfo Control can do it, too. But I'm looking for a different approach. |
Author: | Brightguy [ Wed Nov 23, 2005 9:44 pm ] |
Post subject: | Re: Can you use Windows API to find the screen resolution? |
If you just want the screen height and width, Screen.Height and Screen.Width will return the height/width in twips. (You can divide them by Screen.TwipsPerPixelX and Screen.TwipsPerPixelY to get them in pixels.) If you really prefer using the WinAPI... [after a Google search] ...you can get it with GetDesktopWindow and GetWindowRect. |