Different User Screen Resolutions (1 Viewer)

AnnPhil

Registered User.
Local time
Today, 01:02
Joined
Dec 18, 2001
Messages
246
I have an Access database that is shared with other user that have different resolutions and when viewing some forms it does not look right. If you have multiple users with different screen resolutions, what are some ways of dealing with this?

I notice with Northwind DB example, when you click on one of the application's minimize or maximize buttons the forms resize to fit but when i go into my database and try this it does not happen and sometime the forms do not look right.

Any idea on how to do this? or is there a better way around this?
 

G37Sam

Registered User.
Local time
Today, 04:02
Joined
Apr 23, 2008
Messages
454
I have an Access database that is shared with other user that have different resolutions and when viewing some forms it does not look right. If you have multiple users with different screen resolutions, what are some ways of dealing with this?

Display a message when the DB starts saying this DB runs best with 1024x768 for example

Don't make your forms excessively large
 

Yarp

Registered User.
Local time
Today, 01:02
Joined
Sep 16, 2009
Messages
51
On the forms properties, there is a 'resize' flag and a 'centered' flag. I can't remember the exact names at present, but that could be a starting point.

I am guessing that you are opening the forms as maximised? This can cause issues. We still have users who have their resolutions set to 800x640 on 19" LCD's. Looks rediculous, but they won't change, so you have to allow for it.
 

darbid

Registered User.
Local time
Today, 02:02
Joined
Jun 26, 2008
Messages
1,428
I have an Access database that is shared with other user that have different resolutions and when viewing some forms it does not look right. If you have multiple users with different screen resolutions, what are some ways of dealing with this?

I deal with MSAccess 2003 - as far as I understand you just have to live with it and build your forms for one resolution.

The way i deal with it is I chose one resolution and build all my forms for this resolution in mind.

The below code runs at start up and if they have a smaller resolution then my coded size, then on the welcome screen it shows the user their resolution and the suggested resolution.

Then if you want to have what I think is pretty cool forms in the open event I check the vertical and horizontal resolution. If either one is smaller or both is too small then I set the scrollbars property of the form.

0 = neither
1 = horizontal
2 = vertical
3 = both

I have done this in the below code with the variable "int_ScrollBar" So I just set the scrollbars = int_ScrollBar in the open event.


Code:
Option Compare Database
Option Explicit

Type RECT
    x1 As Long
    y1 As Long
    x2 As Long
    y2 As Long
End Type

Declare Function GetDesktopWindow Lib "user32" () As Long
Declare Function GetWindowRect Lib "user32" _
   (ByVal hWnd As Long, rectangle As RECT) As Long
  
Public Function GetScreenResolution() As String
On Error GoTo Err_GetScreenResolution
'****
'Adds the vertical and horizontal flags to ini
'Each view checks these flags and adds the scroll if necessary
'the result number can be used for the form scrollbars
'0 = neither
'1 = horizontal
'2 = vertical
'3 = both

Debug.Print "*********GetScreenResolution************"

Dim r As RECT
Dim hWnd As Long
Dim retval As Long
Dim stdWidth As Long
Dim stdHeight As Long
Dim int_ScrollBar As String

hWnd = GetDesktopWindow()
retval = GetWindowRect(hWnd, r)

'If (r.x2 - r.x1) < 1280 Or (r.y2 - r.y1) < 1024 Then    ' Another resolution was found
'    'LT_RESOLUTION_FLAG = True
'End If

stdWidth = 1280
stdHeight = 1024

int_ScrollBar = 0

If (r.x2 - r.x1) < stdWidth And (r.y2 - r.y1) < stdHeight Then
    int_ScrollBar = 3
Else
    If (r.x2 - r.x1) < stdWidth Then
        int_ScrollBar = 1
    End If
    
    If (r.y2 - r.y1) < stdHeight Then
        int_ScrollBar = 2
    End If
    
End If

Debug.Print "int_ScrollBar - " & int_ScrollBar
     
Call ProfileSaveItem("PSettings", "ScrollBar", int_ScrollBar, sInifile_pers)

     
     
GetScreenResolution = (r.x2 - r.x1) & " x " & (r.y2 - r.y1)


Debug.Print GetScreenResolution

Exit_GetScreenResolution:
    Exit Function
    
Err_GetScreenResolution:
    MsgBox Err.Description
    Resume Exit_GetScreenResolution
End Function
 

darbid

Registered User.
Local time
Today, 02:02
Joined
Jun 26, 2008
Messages
1,428
oh sorry I did mean that you have to live with it (the resolution) or pay for an extra piece of software. :)
 

boblarson

Smeghead
Local time
, 17:02
Joined
Jan 12, 2001
Messages
32,059
oh sorry I did mean that you have to live with it (the resolution) or pay for an extra piece of software. :)
Or third option - spend the time necessary to recreate the functionality that piece of software give you but you will likely need to spend a whole lot of time on it and have very good coding skills. There is a reason why we point people to Peter's program. The resources required to recreate it are just not available to most.
 

Users who are viewing this thread

Top Bottom