Can you use Windows API to find the screen resolution?
Author |
Message |
HazySmoke)345
![](http://i10.photobucket.com/albums/a121/HazySmoke/clubps2.jpg)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Brightguy
![](http://compsci.ca/v3/uploads/user_avatars/527435178485ad4c287538.gif)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
|
|