Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Determining DPI of user's monitor

Geek News

Determining DPI of user's monitor
cinnie 12/27/2008 10:41:01 PM
greetings


from within Access code, how can I determine the DPI setting of the user's
computer? (the value found in Control Panel/Display/Settings/Advanced/DPI
setting)

--
Thank you in advance
cinnie
Re: Determining DPI of user's monitor
"Arvin Meyer [MVP]" <arvinm[ at ]mvps.invalid> 12/28/2008 12:42:51 AM
This should get the user's screen resolution:

Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As
Long

Public Sub GetScreenRez()

Const X_FULL_SCREEN = 16
Const Y_FULL_SCREEN = 17

Dim lngX As Long
Dim lngY As Long

lngX = GetSystemMetrics(X_FULL_SCREEN)
lngY = GetSystemMetrics(Y_FULL_SCREEN)

Debug.Print "Screen Resolution = " & lngX & " x " & lngY

End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"cinnie" <cinnie[ at ]discussions.microsoft.com> wrote in message
news:1FFAE7EC-1A93-49D3-A385-B48582CCB0C5[ at ]microsoft.com...
[Quoted Text]
> greetings
>
>
> from within Access code, how can I determine the DPI setting of the user's
> computer? (the value found in Control Panel/Display/Settings/Advanced/DPI
> setting)
>
> --
> Thank you in advance
> cinnie


Re: Determining DPI of user's monitor
"AccessVandal via AccessMonster.com" <u18947[ at ]uwe> 12/29/2008 10:16:15 AM
Download the sample here.

http://www.jamiessoftware.tk/resizeform/rf_download.html

Look into the code where you can determine the DPI, go to the function
getFactor some where in the code put
Debug.Print GetScreenResolution.DPI

Hope it helps

cinnie wrote:
[Quoted Text]
>greetings
>
>from within Access code, how can I determine the DPI setting of the user's
>computer? (the value found in Control Panel/Display/Settings/Advanced/DPI
>setting)
>

--
Please Rate the posting if helps you

Message posted via http://www.accessmonster.com

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net