Results 1 to 12 of 12

Thread: Screen Size

  1. #1
    Join Date
    Jan 2011
    Posts
    83

    Unanswered: Screen Size

    Hi All,

    I have 12 users on Access 2016 all using different size monitors. They vary so much, some screens have command buttons all over the screen on my mainform. Other screens have all the command buttons pushed to the upper left corner. As I can not size the contents of the mainform any larger than the smallest monitor allows, is there a way I can program so that:

    When the form opens, it works out the screen resolution and stretches my forms to fit the resolution of each monitor?

    Thanks in advance,

    Simon

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by Yorkshire Lad View Post

    When the form opens, it works out the screen resolution and stretches my forms to fit the resolution of each monitor?
    Is this a statement or a question? The wording sounds like the former, but there is a question mark at the end! If a question, then 'yes.' That's what needs to happen and there are a number of hacks out there for doing this.

    If it's a statement, i.e. you have code for doing this, then the problem is probably that your machine has a higher screen resolution the lowest resolution you're encountering. All of these hacks come with the caveat that they work best when the app is developed in the lowest resolution that will be encountered so that the hack can scale them up.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Jan 2011
    Posts
    83
    It is a question. I want to know the code that I should put behind the Form Open event which would make every from stretch to the full size of whichever monitor it is view on. Does this make sense?

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Sure! There are a number of hacks out there, but when I was doing commercial development I used this, without problems, a number of times. Called the Access Form Resizer, it is a freeware VBA code module that you can install and compile into your own Access application. It was originally developed by Jamie Czernik and has been improved, over the years, with contributions from others. You can download it here:

    Access Form Resizer

    Click on Form Resizer, near the bottom, to go to the download site.

    Linq ;0)>
    Last edited by Missinglinq; 05-27-16 at 19:33.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Jan 2011
    Posts
    83
    Thank you for this. I have had a look at Jamie's site but his version only works up to Access 2007. I am on 2016 and can nto open his file. Do you know of any updated code for 2016?

  6. #6
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    I suspect that he's just not bothered to update the description, vis--vis the versions supported. Have you actually tried it? In fact, almost any hacks you find, online, that are developed in earlier versions, will run in later versions.

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  7. #7
    Join Date
    Jan 2011
    Posts
    83
    I have tried to download the file but it will not open in my version of Access for Office 2016

  8. #8
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by Yorkshire Lad View Post
    I have tried to download the file but it will not open in my version of Access for Office 2016
    It's not supposed to open in any version of Access...it's a ZIP FILE! You have to download it to your PC, Unzip it, then copy it into you Access app.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  9. #9
    Join Date
    Jan 2011
    Posts
    83
    I have unzipped and there are two files called

    readme.html
    afr.mdb

    When i click on the aft.mdb, i get a list of 2 directories and 27 files (gifs and html) What do I do with these files?

  10. #10
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    download the afR not afT zip file
    the read the readme file....
    whether the code works on A206 I dunno.....
    I'd rather be riding on the Tiger 800 or the Norton

  11. #11
    Join Date
    Jan 2011
    Posts
    83
    Thank your for your help. I can find no code anywhere and I obviosuly do not have the skills needed for this, so I will leave it. Thanks again.

  12. #12
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    With just a bit of finagling you ought to be able to combine two web pages to get what you want.

    The first is: http://stackoverflow.com/questions/1...re-size-a-form

    The second is: https://support.microsoft.com/en-us/kb/138901

    The concepts are a bit advanced, but the general idea is to create two functions... One gets the actual screen resolution using the code snippet from the first link above. The second function iterates over the items in a form then repositions and resizes those form items to match the current resolution.

    I don't have the code handy, but I've written similar code several times and it has always worked well for me.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •