Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Feb 2001
    Location
    ms
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Determing display resolution from acess

    Is there a way to determine screen resolution so that you can create a form that is different sizes for different resolutions. Or is there a easier way to deal with the situation of displaying forms for people that run different resolutions?

    thank you
    angiew
    angiew@redmagnet.colm

  2. #2
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Altnau, Thurgau, Switzerland
    Posts
    447
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Determing display resolution from acess

    This should help you for the screen resolution.

    Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long
    Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long

    Public Function GetScreenXResolution() As Long

    Const HORZRES = 8 ' Horizontal width in pixels

    Dim ScreenHDC As Long
    ScreenHDC = GetDC(0)

    GetScreenXResolution = GetDeviceCaps(ScreenHDC, HORZRES)
    End Function

    Public Function GetScreenYResolution() As Long

    Const VERTRES = 10 ' Vertical width in pixels

    Dim ScreenHDC As Long
    ScreenHDC = GetDC(0)

    GetScreenYResolution = GetDeviceCaps(ScreenHDC, VERTRES)
    End Function

    Public Sub DisplayDesktopApplet()
    'Display the screen properties applet
    Dim l As Long
    l = Shell("CONTROL.EXE DESK.CPL", vbNormalFocus)
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •