Screen resolution through VBA code

  • Thread starter Thread starter T.J. Bernard
  • Start date Start date
T

T.J. Bernard

I have a few access users of a database, in which their
resolution is not the work standard of 1024x768. I was
wondering if there was a way in code to change the
resolution of everyone's screen to 1024x768 regardless of
what their resolution is at the current time.

I thought this might be the easiest, and the users have
agreed to allowing the smaller resolution for this one
database.

An even more advanced question would be, is there a way I
can read and save the screen resolution when the database
is opened. Then set the resolution to 1024x768, then once
they exit the database (force them to use the "Exit"
command button) set the resolution back to how it
originally was.

Thank you for any help you can offer,

T.J. Bernard
 
While your users may agree to it, in general it's considered very bad to
change user settings. What happens if you get a vision-impaired user at some
point?

Having pontificated, though, Randy Birch has code to allow you to change the
resolution at http://vbnet.mvps.org/code/enums/enumdisplaychange.htm and if
you poke around there, you should find code to detect the current setting.

(Obligatory warning: Randy's site is aimed at VB programmer. Since there are
significant differences in what controls are available for forms between VB
and Access, some of the examples won't port directly to Access. I think the
one I've pointed you to should port without any problems)
 
Back
Top