Douglas J. Steele said:
I would suggest very strongly that this isn't something you should be doing.
As developers, we have no right to change settings that our users have
selected. Remember, your application is only one of many that they may be
using simultaneously, and whatever change you make is going to affect all of
their applications. I work with at least one visually impaired individual
who would be forced to scrap your application if you changed his resolution.
That having been said, you could have a form open as hidden when your
application opens. Put code in that form's Open and Close events. Since the
database cannot be closed without your hidden form closing, its Close code
will always run, regardless how the user shuts the application down (unless
they do so by powering off the machine, which will lead to a whole new set
of problems anyhow!)
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Thanks Doug.
The user in question is quite prepared to change the resolution of his
screens to accommodate the database but my thinking was that if he were to
install other software, that required another screen res or another user
changed it, then he would have to be changing the res every time he used each
bit of software. Therefore it would be nice if the database could change it
when opened and then change it back again to the original res when it closed.
Your idea will work, and I thank you for that, but the problem is you have to
stipulate the resolution, you want to change to, in code. Is there any way I
can put the original screen resolution into a variable when the DB opens so
that it knows what resolution to change it back to when it closes?