Screen Resolutions

B

Bill

Is there a system variable that can be accessed that will
reveal the current screen resolution? I'd like to know if
the user's resolution is set to 800x600 or 1024x768.

Thanks,
Bill
 
A

Alex White MCDBA MCSE

Hi Bill,

in a module

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

Public Const SM_CXSCREEN = 0
Public Const SM_CYSCREEN = 1

Sub VideoResolution()
vidx = GetSystemMetrics32(SM_CXSCREEN)
vidy = GetSystemMetrics32(SM_CYSCREEN)
msg = "The current video mode is: "
msg = msg & vidx & " X " & vidy
MsgBox msg
End Sub

I think there is other ways but personally I always use the API.
 
B

Bill

EXCELLENT!!!!

I recently encountered new users that have 19" flat-screen monitors.
With that, came users that more often than not use finer resolutions,
as one would expect. The only significant hit to me was the scaling
of the switchboard. I keep two copies of the AC switchboard, one for
1024 x 768 and one for 800 x 600. With the code you sent, I now
simply check to see if the user has the switchboard appropriate to
his/her screen settings and launch the appropriate form.

Thanks,
Bill
 
R

Rick Brandt

Bill said:
EXCELLENT!!!!

I recently encountered new users that have 19" flat-screen monitors.
With that, came users that more often than not use finer resolutions,
as one would expect. The only significant hit to me was the scaling
of the switchboard. I keep two copies of the AC switchboard, one for
1024 x 768 and one for 800 x 600. With the code you sent, I now
simply check to see if the user has the switchboard appropriate to
his/her screen settings and launch the appropriate form.

Just curious, why not use the one for 800 by 600 for everyone? Users who
run higher resolutions expect (and actually want) the apps to take up a
smaller percentage of the screen (otherwise they wouldn't have chosen that
setting). You might just be irritating them by producing a giant version of
your forms.

Take calculator for example. It doesn't grow to take up the same percentage
of the screen on higher resolution settings. The assumption is that the
user with a higher setting also has a physically larger display and the
combination still produces an application that is perfectly readable even
though it is taking up less of the screen. Standard Windows behavior would
dictate that you design for the lowest resolution you are likely to
encounter and just leave it at that.
 
B

Bill

Good point. And, I generally agree with you. It is only in this particular
application that contains a lot of continuous forms that the users enjoy
using the full capacity of their screens. The desire was to maintain some
level of consistency between the size of the switchboard and most all of
the other screens they encounter.
Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top