Re: Screen Size
- From: "Jim Y" <jj819stuffNOSPAM@xxxxxxxxxxx>
- Date: Wed, 18 Oct 2006 21:56:37 -0400
"Mike Williams" <Mike@xxxxxxxxxxxxxxxxx> wrote in message
news:ucg0hEw8GHA.3264@xxxxxxxxxxxxxxxxxxxxxxx
I would appreciate it if anyone out there could tell me what value is returned on their own
systems, especially those people who may have more than one graphics card and / or more than one
monitor. Try the following code and compare the returned result (in the Form's Caption bar) to the
actual physical measurement across the width of the display. It may not have anything to do with
the monitor or graphics card driver of course, but I'd like to see the results. Windows must be
getting these values from somewhere.
Mike
Option Explicit
Private Declare Function GetDeviceCaps Lib "gdi32" _
(ByVal hdc As Long, ByVal nIndex As Long) As Long
Private Const HORZSIZE = 4 ' Horizontal size in millimeters
Private Sub Form_Load()
Caption = GetDeviceCaps(Me.hdc, HORZSIZE) & " millimeters"
End Sub
XP home SP2, 17" CRT, 1024x768 pixels, Intel 82865G graphics controller
measured width = 330 mm, Caption = 320 millimeters
Jim Y
.
- References:
- Screen Size
- From: Mike Williams
- Screen Size
- Prev by Date: Compile Differences, WinXP-Pro and Win2K
- Next by Date: Re: Registry verses INI
- Previous by thread: Re: Screen Size
- Next by thread: Re: Screen Size
- Index(es):
Relevant Pages
|