X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> anyone got code thats resizes forms to fit the monitor res?    
post May 6 2009, 12:20 AM

Posts: 441
Joined: 14-April 04

Hi I'm trying to find some code to call that sets form sizes to suit the users monitor resolution. I've tried: utteraccesslink and it doesnt seem to work, I dont think I'm doing anything wrong but it doesnt scale right (possibly written pre wide screen monitor resolutions?)
Any pointers?
Go to the top of the page
post May 6 2009, 01:02 AM

UtterAccess VIP
Posts: 1,285
Joined: 8-April 07
From: South East - United Kingdom

Have a look at the attachment. It doesn't work perfectly but using the demo that come with it (try frmCalc and frmResize) you can get a general gist of how it works.
I've found that it works perfectly if scaling up (say from 800 X 600 to 1024 X 768) but going the other way tends to give it a headache.
Attached File(s)
Attached File  ADHResizeTest2K.zip ( 220.23K )Number of downloads: 108
Go to the top of the page
post May 6 2009, 08:57 AM

Posts: 18,324
Joined: 29-March 05
From: Wisconsin

Personally, I find out what the lowest resolution my users use. Then, I design the database for that resolution. Users who use higher resolution settings often do so to have smaller controls on the screen (so they can fit more stuff on the screen at once). Enlarging a form to fit a higher resolution would work against this strategy, so I don't bother.
Just my two cents.
Go to the top of the page
post May 6 2009, 09:25 AM

Posts: 4,605
Joined: 11-November 02

I've been using this code without problems for a number of years. It does work best, as most of these type of hacks do, when the app is developed in the lowest resolution you'll be dealing with. Maybe if you download the original code you'll have better luck. The download also includes a documentation file that may help you get it working.
Scroll down to "Form Resizer." It comes in v97, so when you go to open the sample database, click OK when asked if you want to convert it to your version of Access.
Good luck!
Go to the top of the page
post May 6 2009, 06:44 PM

Posts: 441
Joined: 14-April 04

Hey sad.gif
dropped in the code from missingling's link, it works almost perfectly. Upon reading the instructions i think perhaps i see where i went wrong with the original code - it said to call the module for subforms as well on the load event, I'd assumed that because subforms are treated as a control that wasn't neccessary.
I'm stoked it worked, a couple of the forms are going up on 46 inch monitors in the middle of a big cubefarm - I was starting to feel like a bit of a muppet when each time I tested resizing code all everyone could see was a massive train wreck of overlapping controls ohyeah.gif
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    20th May 2019 - 11:44 PM