Is there a way to have an access form auto adjust itself based on the users screen resolution? I have a form I created in 1280x768 (something like that), but the resolution for the users varies. Isn't there code to add for this to auto adjust?
Yea...I've been searching and I found that, but I'm at work and I don't think they'll allow me to use a 3rd party. I heard there was a module that had code for it. What I found so far was this following, but a lot of it doesn't seem like it's access code...?
* --- Original Auto-Center No Longer Works ---
* -- Modify FORM Position To Center On New Screen Size ---
THISFORM.TOP = (((mnScreenH * .85) - THISFORM.HEIGHT) / 2)
THISFORM.LEFT = (((mnScreenW * .97) - THISFORM.WIDTH) / 2)
ENDIF
The code you presented [blue]only accounts for sizing the form.[/blue] You also have to account for the sizes of sections, textboxes, fonts, other objects, as well porportional spacing between objects.
This is alot work considering you have to [blue]keep track of object positions[/blue] as well (that is if [blue]you don't want resizing to produce scroll bars!)[/blue]
So to be sure ... [purple]this is a much more formidable task then your code shows![/purple]. If you consider forms with large numbers of objects, a long and arduous amount of design time comes to the surface.
I've not used the 3rd party software I presented, but I have seen it tested on a coworkers machine. The results were very good.
[blue]Good Luck[/blue] in finding resolution here. If I come across anything worthy I'll be sure and let you know . . .
There is a chapter in the Access Developers HandBook on creating resizable forms. It basically drills down through the form and it's controls, resizing everything by the same ratio. It takes into account such things as changing font sizes as well as the control size.
I tried it once and the results were functional but not very aesthetically pleasing. The problem is that while you want some controls to grow and shrink at the same ratio as the form resizes, other controls look ridiculous once they get past a certain size. Buttons for example start looking very Fischer-Pricey after a certain size is exceeded.
Only practical solution I have ever found is to design the form for the minimum resolution you expect the users to have.
Basically what I decided to do from researching on here, is just create the form in a low resolution. That way, when a higher resolution user opens it, it looks fine on their screen as well. It's a "band-aid" fix for now, but it works.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.