Results 1 to 3 of 3
  1. #1
    mictinfo is offline Novice
    Windows Vista Access 2003
    Join Date
    Apr 2013
    Posts
    1

    screen resolutions

    I have an Access database that people in my organization can access. This is my problem. Some computer monitors are set at different screen resolutions and range from 15" to 21" monitors. The database was put together using a 17" monitor and with a screen resolution of 1024x768 which I believe to be the standard.



    Systems that open on a 15" monitor with a resolution of 800x600 cannot see the edges of the database and this poses a problem form them as some of the edges contain the beginning or end of text. For example, in a 1024x768 environment, the user would see the word "Hello", but the user on an 800x600 resolution environment would see "ello" because the H cannot be seen. I hope that part makes sense!

    My question: Is there a way that my application on opening (through an Event I presume?) can check the computer monitor resolution on the system it is running on and then change its properties to match the screen resolution? What I am trying to put across is this: If I put four monitors next to each other that are of different monitor size and different screen resolutions, is there a way where the database would look the same on all of them, and not notice that text is missing from the edges etc...

    Thanking you in advance.

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    I don't see that this is possible unless you do a lot of programming to alter the sizes of forms and the layout/sizes of controls on the forms. In my experience there are 3 options:
    1. Optimise the database for the smallest resolution.
    2. Add scrollbars to all the forms.
    3. Update all monitors to have the same resolution or at least be compatible with the size the database is optimised for.

    EDIT: Depending on the complexity of your forms you could create a copy of each form i.e. one for each resolution and then choose which form to display depending on the monitors resolution. The problem with this though is when you need to add a new bit to a form.

  3. #3
    redbull's Avatar
    redbull is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2012
    Location
    Missouri
    Posts
    480
    I found this on msdn, it seems to work just fine.

    After you pop all of this in the module, open the immediate window and type in ? GetScreenResolution and press enter. It will return the screen size.

    So I think with these functions in a module, you could have an on load even for your forms that checks the screen size, then you could SOMEHOW resize the elements on your forms.


    Hope this gets your a little closer to your goal

    EDIT: You could say,

    IF GetScreenResolution = "" then
    Forms!formName.scrollbars = true
    end if


    Code:
    Option Compare Database
    '*****************************************************************
    ' DECLARATIONS SECTION
    '*****************************************************************
    
    
    Option Explicit
    
    
    Type RECT
       x1 As Long
       y1 As Long
       x2 As Long
       y2 As Long
    End Type
    
    
    ' NOTE: The following declare statements are case sensitive.
    
    
    
    
    Declare Function GetDesktopWindow Lib "User32" () As Long
    Declare Function GetWindowRect Lib "User32" _
          (ByVal hWnd As Long, rectangle As RECT) As Long
    
    
    '*****************************************************************
    ' FUNCTION: GetScreenResolution()
    '
    ' PURPOSE:
    '   To determine the current screen size or resolution.
    '
    ' RETURN:
    '   The current screen resolution. Typically one of the following:
    '      640 x 480
    '      800 x 600
    '     1024 x 768
    '
    '*****************************************************************
    Function GetScreenResolution() As String
    
    
       Dim R As RECT
       Dim hWnd As Long
       Dim RetVal As Long
    
    
       hWnd = GetDesktopWindow()
       RetVal = GetWindowRect(hWnd, R)
       GetScreenResolution = (R.x2 - R.x1) & "x" & (R.y2 - R.y1)
    
    
    End Function

Please reply to this thread with any new information or opinions.

Similar Threads

  1. How to have a Subform fit to screen?
    By Astron2012 in forum Forms
    Replies: 2
    Last Post: 08-18-2012, 09:03 AM
  2. Log-in Screen
    By imintrouble in forum Forms
    Replies: 8
    Last Post: 10-11-2011, 04:24 AM
  3. Replies: 11
    Last Post: 06-05-2011, 09:51 PM
  4. print screen
    By SlowPoke in forum Access
    Replies: 1
    Last Post: 10-06-2010, 04:09 PM
  5. Screen Size
    By maintt in forum Access
    Replies: 4
    Last Post: 08-02-2010, 01:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums