Results 1 to 11 of 11
  1. #1
    fluffyvampirekitten is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    108

    How to resize the form based on the computer resolution

    I am trying to locate any available code that will allow a form to open up maximized based on the screen resolution.


    I've tried the below code but I'm still facing the same problem
    Code:
    DoCmd.Maximize
    The application I am working on will be used on several different computers with several different monitors.

    Any Ideas?
    Thank you in advance

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Maximize is as big as it can get.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by fluffyvampirekitten View Post
    ...
    Any Ideas?
    I build my apps for a minimum screen resolution. I have heard of ways of creating different forms for different screen res. and then call the correct form based on screen res. This has always sounded to me like creating two different applications, which I sometimes do anyway. The difference in my apps is that I do not combine two different apps into one. I create two different apps for two different minimum screen resolutions and distribute the appropriate application to a specific group.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Forms can't be changed to suit screen resolution, not like I can set zoom magnification level on this web page. As already described, have to design objects to meet the expected screen resolution and monitor size. Could build duplicate forms in one database and depending on the username or maybe the computer name, both of which can be pulled with the Environ() function, open appropriate form. This would require a UserInfo (or ComputerInfo) table that documents setting preferences (resolution level) and then code would open appropriate form. I don't know if there is a way to pull the screen resolution settings from the computer system.

    Not the first time this topic has come up.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I believe they can be, having read about this problem on and off for a number of years. However, I've never tried it because my philosophy is to develop for the most common resolution (unless directed otherwise by the end user) and let others deal with the issue as necessary. Sometimes, that would be having to use scrollbars where they didn't appear before. Sometimes, they have to adjust their monitor resolution - maybe permanently, and maybe just as long as they need the application. You should not have to be concerned about either a user's refusal to get glasses and move away from 800x600 monitor resolution, or a company that won't shell out a measly sum for a monitor to suit the business needs. What you are asking for is a one-size fits all approach, which you apparently can achieve for form size, but probably will not go for when you see what you're up against. Check out http://bytes.com/topic/access/answer...-resizing-code or any other web lookup you can find to see what I mean. If this daunts you as much as it would me, another option would be to create duplicate forms or reports and choose to open one or the other based on two possible scenarios. The biggest fault with your desired approach is that you could re-size the forms, but you cannot resize the controls on them. So you may end up with a scaled down/up form that has controls that become crammed, overlapping or just plain not visible.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Right, code would have to change form dimensions, controls width/height/top/left, text font size, etc. Basically what would have to be done to build the multiple alternate forms. Essentially why I said can't be done because it is just so demanding a coding effort, especially if form has hundreds of controls.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    fluffyvampirekitten is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    108
    Quote Originally Posted by ItsMe View Post
    I build my apps for a minimum screen resolution. I have heard of ways of creating different forms for different screen res. and then call the correct form based on screen res. This has always sounded to me like creating two different applications, which I sometimes do anyway. The difference in my apps is that I do not combine two different apps into one. I create two different apps for two different minimum screen resolutions and distribute the appropriate application to a specific group.
    How do you create two different minimum screen resolutions ? My current resolution is 1366 X768. One of my forms , I can't see the right side of my form, I have to go to Edit view and scroll to the right .

  8. #8
    fluffyvampirekitten is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    108
    How do i make it appropriate for normal size resolution? What is the common resolution?

  9. #9
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I will typically choose between 11 inches wide or 14 inches wide. One application will have 11 inch wide forms and another application will have 14 inch wide forms.

  10. #10
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Quote Originally Posted by fluffyvampirekitten View Post
    How do i make it appropriate for normal size resolution? What is the common resolution?
    I'm referring to whatever is "normal" or common within the organization. When I first started developing in Access, 800x600 was new - typical was 640x480 (yikes, I'm giving too much away!). Obviously, those db's (if they were still around) might appear small with a lot of space in the window on today's monitors. So if you build for whatever is most common in an organization, anybody with higher res should not have an issue. Those who are stuck with lower res but don't have to be, need to change. I worked for a place where some were still using 800x600 but refused to wear glasses, so I wasn't kidding. Anyone who was using 1366x768 had no issue while I developed in 1024x768. To me, creating two of everything just sounds like way more work than I was ever inclined to do, but I guess not all situations are the same.

  11. #11
    fluffyvampirekitten is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jun 2015
    Posts
    108
    I understand now. Thank you so much

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Form resize won't save
    By ConnorLally in forum Forms
    Replies: 4
    Last Post: 11-13-2014, 06:15 AM
  2. Replies: 1
    Last Post: 07-24-2014, 04:48 PM
  3. Replies: 4
    Last Post: 11-29-2012, 12:45 AM
  4. resizing form based on resolution
    By Jerry8989 in forum Forms
    Replies: 4
    Last Post: 10-09-2009, 08:55 AM
  5. Adjusting Form size based on screen resolution
    By stombiztalker in forum Forms
    Replies: 0
    Last Post: 02-17-2009, 07:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums