Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / July 2008

Tip: Looking for answers? Try searching our database.

Controls that Expand and Contract with Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank Wagner - 17 Jul 2008 14:48 GMT
I develop software for schools.  Some of them have old Window 98 computers
that are used at 800 X 600 resolution and some are newer and kept at 1024 X
768 resolution.  Some of my forms have design controls that go from edge to
edge.  It I set them at the 800 X 600 resolution they fall short at the
higher resolution, and if I set them at the 1024 X 768 resolution they
overlap the form at the smaller resolution.

Is there any way that the design controls can be set so that they will
expand or contract with the form when it goes from one type of computer to
the other.

Any help would be appreciated.
Signature

Frank Wagner
fwagner111@aol.com

Golfinray - 17 Jul 2008 14:51 GMT
In the form properties, set cangrow to yes and canshrink to yes.

> I develop software for schools.  Some of them have old Window 98 computers
> that are used at 800 X 600 resolution and some are newer and kept at 1024 X
[quoted text clipped - 8 lines]
>
> Any help would be appreciated.
Frank Wagner - 17 Jul 2008 15:05 GMT
I use Access 2000 and don't see cangrow and canshrink in the form properties.
is there something I'm missing
Signature

Frank Wagner
fwagner111@aol.com

> In the form properties, set cangrow to yes and canshrink to yes.
>
[quoted text clipped - 10 lines]
> >
> > Any help would be appreciated.
Klatuu - 17 Jul 2008 15:47 GMT
Even if 2000 had Can Grow, Can Shrink, it wouldn't work.  Those properties
respond to the content of the control, not the screen resolution.

Here is a link to an API call that will tell you what the current screen
resolution is.  

http://www.mvps.org/access/api/api0012.htm

You could then use that the dynamically size your controls.
To change the width,  you use the control's Width property.  It is set using
twips, which is 1440 twips per inch.  So , to set a control's width to 2
inches, it would be:

Me.MyTextBox.Width = 2880

So I would suggest you use the Load event of the form (the Open is too
soon), determine the resolution of the screen, and set the control size
accordingly.
Signature

Dave Hargis, Microsoft Access MVP

> I use Access 2000 and don't see cangrow and canshrink in the form properties.
>  is there something I'm missing
[quoted text clipped - 13 lines]
> > >
> > > Any help would be appreciated.
Frank Wagner - 17 Jul 2008 16:18 GMT
Dave:

Thanks.  I had a feeling that's where I was headed, but hoped there might be
an easier way.  Thanks for the reference as to how to automatically get the
screen resolution and screen size.

Your comments are right on target.

Thanks Again
Signature

Frank Wagner
fwagner111@aol.com

> Even if 2000 had Can Grow, Can Shrink, it wouldn't work.  Those properties
> respond to the content of the control, not the screen resolution.
[quoted text clipped - 32 lines]
> > > >
> > > > Any help would be appreciated.
Klatuu - 17 Jul 2008 16:22 GMT
Glad I could help.
Signature

Dave Hargis, Microsoft Access MVP

> Dave:
>
[quoted text clipped - 42 lines]
> > > > >
> > > > > Any help would be appreciated.
pddxxx@gmail.com - 17 Jul 2008 17:14 GMT
Frank,

There are third-party form scaling solutions available that might
help:

A shareware version of a form rescaling module I wrote called
ShrinkerStretcher is available at this web site: http://www.peterssoftware.com/ss.htm

There's a form resizer at http://www.jamiessoftware.tk/resizeform/rf_jump.html
.

Another one: http://sourceforge.net/projects/modscaleform

The Access Developer's Handbook has form resizing code included:
http://www.amazon.com/exec/obidos/ISBN%3D0782119417/107-8064361-7403703

Hope this helps,

Peter De Baets
Peter's Software - Microsoft Access Tools for Developers
http://www.peterssoftware.com
Frank Wagner - 17 Jul 2008 19:22 GMT
Peter:

Thanks.  I'll take a look and try them out.
Signature

Frank Wagner
fwagner111@aol.com

> Frank,
>
[quoted text clipped - 17 lines]
> Peter's Software - Microsoft Access Tools for Developers
> http://www.peterssoftware.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.