ShrinkerStretcher
Version: 8.0.81 (for Access 97, can be converted to Access 2000)

Peter's Software

http://www.peterssoftware.com	- Other Access Tools
http://www.nstarsolutions.com/900.htm	- To Order ShrinkerStretcher


-----------------------------------------------------------------------

Contents
========

1.  What Is ShrinkerStretcher?
2.  Contacting Me
3.  Registering ShrinkerStretcher
4.  Installing ShrinkerStretcher
5.  Compile Time Options
6.  Notes About Maximized Forms
7.  Known Problems
8.  New Features in this Version


-----------------------------------------------------------------------

1. What Is ShrinkerStretcher?
=============================

ShrinkerStretcher is an MS Access module that will dynamically (or statically) rescale your MS Access forms, fonts, and controls to fit any screen resolution, desktop scheme, font setting, or form window size. Using ShrinkerStretcher means you can develop applications without concern for your end user's display settings! Scale your 800x600 application up to 1024x768, or to any other resolution.

ShrinkerStretcher supports varied display settings including any resolution, small-large-custom fonts, wide scroll bars, thick borders, and more. Use ShrinkerStretcher dynamically, to rescale your forms at every resize event, or statically (.mdb files only), to rescale all forms to match the current resolution.

It's easy to add into your new or existing applications. Just add a reference from your Access database to "SSnn.mdb" ("SSnnd.mdb" if you are using the demo - "nn" refers to the Access version, and ShrinkerStretcher version, respectively), then add one line of code to your "OnOpen" event procedure, and one more to your "OnResize" event procedure.

The demo versions of ShrinkerStretcher (those zip and exe files with the "d", or "demo" suffixes) are shareware programs. This means that you may test them free of charge. You may also distribute them freely to others so they may try it.

-----------------------------------------------------------------------

2. Contacting Me
================

I provide technical support by e-mail to registered users of ShrinkerStretcher only.

I can be contacted at the following address:

info@peterssoftware.com

I process most e-mail and orders within 24 hours of receiving them. If you have not heard from me within 48 hours of sending mail, it is likely that I have a problem with your e-mail address - either the Reply To field in your e-mail program is incorrect, or possibly there is a problem with your mail server. Please contact me again.


-----------------------------------------------------------------------

3. Registering ShrinkerStretcher
================================

To register ShrinkerStretcher, please send a check made payable to "PETER'S SOFTWARE" for the equivalent of

US$35.95 (1-5 licenses)
US$65.95 (6-20 licenses)
US$129.95 (21-100 licenses)
US$200.00 (unlimited, royalty free distribution license)
US$164.05 (Upgrade from 1-5 licenses to unlimited license) to:

	Peter's Software
	1317 Oceanfront #2
	Santa Monica, CA  90401-1025
	USA

Please include your e-mail address so I can send SHRINKERSTRETCHER to you immediately!

To purchase online with your Visa, Mastercard, American Express, Discover, Switch, or Diners card, go to: 

http://www.peterssoftware.com/buy.htm

For your convenience I have contracted another company, NorthStar Solutions, to process any orders you may wish to place with your Visa, MasterCard, or Discover card.  Please be sure to mention you would like to order Product #1432 - ShrinkerStretcher for Access 2.0, or Product #1433 - ShrinkerStretcher for Access 97/2K when placing your order. Also, please enter a quantity that corresponds to the number of licenses that you require (prices are the same as above):

INTERNET ORDERS
Visit NorthStar Solutions at 
http://www.nstarsolutions.com/900.htm
and fill out their online order form--fast, easy and secure!

PHONED ORDERS
Calls are taken Monday-Friday, 9am-7pm, CST
800 699-6395 (U.S. only.) 
785 539-3731
ask for Product #1432 (for Access 2.0) or #1433 (for Access 97 & 2000)

FAXED ORDERS
Available 24 hours.
785 539-3743

E-MAILED ORDERS
CompuServe: starmail
America Online: starmail
Internet: starmail@nstarsolutions.com 

Please provide (or be prepared to provide) the following information: 
* The program you are registering:  Product #1432 - ShrinkerStretcher for Access 2.0, or Product #1433 - ShrinkerStretcher for Access 97/2K.
* Your mailing address.
* Your Visa, MasterCard, or Discover # and its expiration date (if using credit card).  
* Your E-Mail address (so NorthStar Solutions can send you an E-Mail confirming your order and so I can SEND SHRINKERSTRETCHER TO YOU. I distribute ShrinkerStretcher exclusively via e-mail.).

-----------------------------------------------------------------------

4. Installing ShrinkerStretcher
===============================

If you've received a zip file archive ("SSnn.zip"), extract the zipped files to a folder on your computer.

If you've received a self-extracting .exe file ("SSnn.exe"), double-click the .exe file and follow the instructions on the screen to install ShrinkerStretcher on your computer. 


To run the demo, double-click the "SSnn.mde" (or "SSnn.mdb") file in the folder you installed to, or select "ShrinkerStretcher for Access 97, 2000" from the start menu.


To use ShrinkerStretcher with your Access application:

1. Add a reference from your database to "SSnn.mdb" (or "SSnn.mde"). If you have registered ShrinkerStretcher, you can import the "basShrinkerStretcher" module directly into your applicaion.
2. For every form that you wish to resize/rescale, Add the subroutine call "SS_OnOpen Me" to the form OnOpen event procedure, and "SS_OnResize Me" to the form OnResize event procedure.

Your properties/procedures should look like this:

property:	OnOpen

procedure:	Sub Form_Open (Cancel As Integer)
		SS_OnOpen Me
		'DoCmd.Maximize		'<--- (if needed)
		End Sub


property:	OnResize

procedure:	Sub Form_Resize ()
		SS_OnResize Me
		End Sub

3. Save your form. That's it!


IMPORTANT NOTE ABOUT SUBFORMS:  It is not necessary to include the ShrinkerStretcher subroutine calls in your subforms. The subroutine calls in the parent form will recursively process subforms. The only exception to this is if you dynamically change the subform control source object. In this case, you should include the subroutine calls in your subform.



SEMI-STATIC RESCALING ALL FORMS - You can rescale (to the current screen resolution) and save all of your forms in one shot (will not work for .mde files).

WARNING: This will change every form in your database. ShrinkerStretcher will save the original under the name "<formname> (SSOriginal)", in case you need to restore your original settings.

1. Import the "Rescale All Forms" macro from "SSnn.mdb" into your Access database.
2. If an individual form is to be maximized when opened, put the text "SSMaximize" anywhere in the tag property of the form.
3. Run the macro "Rescale All Forms". ShrinkerStretcher will save the original version of each form as "<formname> (SSOriginal)".



SEMI-STATIC RESCALING MARKED FORMS - You can rescale (to the current screen resolution) and save all of your marked forms in one shot (will not work for .mde files). 

1. Import the "Rescale Marked Forms" macro from "SSnn.mdb" into your Access database.
2. For every form that you wish to Shrink and Stretch, put the text "SSStaticRescale" anywhere in the tag property.
3. If the form is to be maximized when opened, put the text "SSMaximize" anywhere in the tag property.
4. Run the macro "Rescale Marked Forms". ShrinkerStretcher will save the original version of each form as "<formname> (SSOriginal)".



STATIC RESCALING - You can rescale (to the current screen resolution) and save an individual form.

1. Import the "SSControl" form from "SSnn.mdb" into your Access database.
2. Open the form "SSControl", select a form from the list box, and click the rescale button. ShrinkerStretcher will save the original version of the form as "<formname> (SSOriginal)".



IMPORTANT NOTE ABOUT SUBFORMS WHEN STATICALLY RESCALING A PARENT FORM:  To rescale a subform, include the ShrinkerStretcher subroutine calls in the parent form. Then, the subform will be recursively processed. 

ANOTHER NOTE ABOUT STATIC RESCALING:  The constant "conLongFormAdj" can affect the way that forms are statically rescaled. If you don't have any long (multi-page) forms, set "conLongFormAdj" to "False"

TO ADD A REFERENCE from your database to "SSnn.mdb" (or "SSnn.mde"):
1.	In your database, open a Module (any Module) in design mode.
2.	On the Tools menu, click References, and click Browse in the References dialog box.
3.	In the Files Of Type box, click Databases (*.mdb, *.mda, *.mde).
4.	Locate the "SSnn.mdb" (or "SSnn.mde") file.
5.	Click OK.
You should now see ShrinkerStretcher in the list of available references in the References dialog box.
6.	Check it, and close the references dialog.

-----------------------------------------------------------------------

5. Compile-Time Options
=======================

You can change the way that SHRINKERSTRETCHER behaves by setting certain constants in the "basShrinkerStretcher" module's declaration section, and then re-compiling.

#Const conAccessVersion = 7  '* When using Access 95 (version 7.0)
#Const conAccessVersion = 8  '* When using Access 97 (version 8.0) or later

Const conShrinkStretch = True	'* Enables SHRINKERSTRETCHER
Const conShrinkStretch = False	'* Disables SHRINKERSTRETCHER           

Const conChangeFonts = True	'* Enables change font feature
Const conChangeFonts = False	'* Disables change font feature

(The change font feature will change "System" and "MS Sans Serif" fonts to "Arial" when those fonts are shrunk below their respective smallest sizes. This feature has no effect when fonts are stretched. If you will not be shrinking your forms to very small sizes, then you may improve performance slightly by setting this constant to "False".)    

Const conSSAlwaysIsDefault = True   '* By default SS will run
				    '* on every OnResize event.
Const conSSAlwaysIsDefault = False  '* By default SS will run
				    '* once per form.

(When conSSAlwaysIsDefault = True, then the text "SSOneTimeOnly" in the form tag property will cause ShrinkerStretcher to run once for that form. When conSSAlwaysIsDefault = False, then the text "SSAlways" in the form tag property will cause ShrinkerStretcher to run on every OnResize event.)

Const conLongFormAdj = True   '* Enables long form adjustment feature
Const conLongFormAdj = False  '* Disables long form adjustment feature

(The long form adjustment feature will prevent multi-page (long) forms from being excessively shrunk when they are first opened.)

Const conCheckClientArea = True   '* Enables client area check feature
Const conCheckClientArea = False  '* Disables client area check feature

(The client area check feature applies to static and semi-static rescaling only. When enabled, ShrinkerStretcher will maintain a table that holds the Access client area rectangle size. Static rescaling will occur only if the Access client area rectangle size has changed since the last rescaling.)

Const conSSVerbose = true   '* Displays messages during static rescale
Const conSSVerbose = false  '* Inhibits messages during static rescale

Const conAdjustToRes = True   '* Enables resolution adjustment feature
Const conAdjustToRes = False  '* Disables resolution adjustment feature

(The resolution adjustment feature will adjust non-maximized form size up or down to match screen resolution.)

IMPORTANT NOTE - IMPORTANT NOTE:  IF conAdjustToRes = True, then you MUST set the screen resolution and Log Pixels (font size) that your application was developed with:

Const conOrigWd = 800     	'* Sets the horizontal resolution that 
				'* the application was developed with
				'* (640,800,1024,...).

Const conOrigHt = 600		'* Sets the vertical resolution that 
				'* the application was developed with
				'* (480,600,768,...).

Const conOrigLogPixelsY = 96    '* Sets the Log Pixels (font size) that 
				'* the application was developed with 
				'* (96 - smallfonts, 120 - large
				'* fonts, ...)

Const conRetainProportion = True   '* Keeps original form proportions
Const conRetainProportion = False  '* Form proportions can be changed

(The retain proportion feature will insure that the form is scaled evenly in the x and y directions. With this option set to "False", the form is scaled to match the window size, allowing aspect ratio to change.)

Const conMinimumFontSize = 7       '* Set this to smallest readable font point size

(This constant will prevent fonts from being scaled down to un-readable, extremely small fonts.)

Const conTabCtlLoopAdj = True      '* More accurate tab control sizing, slower performance
Const conTabCtlLoopAdj = False     '* Better performance

Const conOptGroupLoopAdj = True    '* More accurate option group sizing, slower performance
Const conOptGroupLoopAdj = False   '* Better performance

(When tab controls, and option groups are placed near form borders, they can sometimes be distorted when rescaled. These constants can be set to "True" to provide more accurate scaling.)

Const conSameResNoInitialScaling = True  '* inhibit initial scaling when form opened at
                                         '* original design resolution.
Const conSameResNoInitialScaling = False '* Scale form when opened regardless of screen
                                         '* resolution

(There may be no need to run ShrinkerStretcher if you are opening the forms at the same resolution they were designed under. Setting this constant to "True" will also reduce ShrinkerStretcher processing under that resolution.)

Const conRetainSubformProportion = False '* "False" will scale subform to fit (squeeze) into
                                         '* subform control.
Const conRetainSubformProportion = True  '* "True" allows subform to retain horizontal 
                                         '* scroll bars and extend beyond the subform                                                '* control.

Const conDatasheetDefault8ptRowHeight = 225   '* Used to determine default datasheet
                                              '* row height just prior to datasheet scaling

(This constant is the height of subform datasheet rows when using an 8 point datasheet font. It is used as a basis for scaling. If your subform datasheet rows are to contain 2 or more lines of data, then this constant needs to be changed. For 2 lines per row use 2 * 225 = 450. 3 lines, 3 * 225 = 675)


-----------------------------------------------------------------------

6. Notes About Maximized Forms
============================== 

* If you are maximizing your form in the OnOpen event procedure, make sure that the call to the SS_OnOpen subroutine preceeds the maximize command. Ex.:

		...
		SS_OnOpen Me
		DoCmd.Maximize
		...

* When you include the text "SSOneTimeOnly" in your form tag property, ShrinkerStretcher scales your form only when it opens. This improves performance by eliminating unneccessary ShrinkerStretcher processing during extraneous OnResize events. It also means that the form and its contents will NOT re-scale when the window is manually resized. If your form is intended to be always maximized, then you may find this "SSOneTimeOnly" tag option desirable.

* If you will be using static or semi-static rescaling to rescale a form that is intended to be maximized when opened, put the text "SSMaximize" anywhere in the form tag property.

* If you have a maximize command in your form OnLoad event procedure, this may cause distortions when ShrinkerStretcher attempts to scale your form. Try moving the maximize command to the OnOpen event procedure.

* When closing a maximized form, you can eliminate the rescalings due to the (undocumented) resize event that occurs when a maximized form closes. In the form Unload event put the code:

If SS_apiIsZoomed(Me.hwnd) Then
    SkipSS = True
End If

-----------------------------------------------------------------------

7. Known Problems
=================
* Right-to-left language versions of Access (Hebrew, Arabic, Indian, Persian) not supported.

* Continuous forms that open "stand-alone" sometimes over-scale objects to very large sizes.

	ShrinkerStretcher uses the saved form window size to initially scale stand-alone
	continuous forms. So by manipulating this window size you can affect the scaling
	of your stand-alone continuous form. Try opening your continuous form in design 
	mode, resize the form window to something close to a square, click file > save,
	then re-open your form.

* Page break controls are not supported by ShrinkerStretcher (they are ignored).

* Subform datasheet fonts do not scale to smaller sizes.

	This is probably because the default datasheet font, MS Sans Serif
        smallest size is 8 point. For smaller font sizes on datasheets, you
        need to change the datsheet default font. Go to tools > options >
        datasheet > default font > arial, to change default font to arial which
        has smaller sizes.

* Resizing subform datasheet rows can cause distortions when the form is re-opened.
    
        This occurs because the datasheet row height when the form is closed is used as
        a basis for scaling when the form is re-opened. This can be used to change the
        overall width of the datasheet. Decrease the row height, close and open the form,
        and the datasheet lengthens. Increase the row height, close and open the form,
        and the datasheet shortens.

* A subform datasheet opened as a stand-alone datasheet will retain it's last rescaled size.

	This is a necessary consequence of datasheet scaling, at least until we
        come up with a better method.

* Mysterious query parameters may appear when a form closes

	This can happen when a maximized form is closed, and an undocumented resize
	event occurs. See the above section "Notes about maximized forms" for a solution

* The rescaling routines execute after the form is closed.

	This can happen when a maximized form is closed, and an undocumented resize
	event occurs. See the above section "Notes about maximized forms" for a solution

* Bitmaps on command buttons do not rescale.

	This is because it is not easy to access the bitmap. However, you can create
        an image control (with size mode set to zoom, or stretch) on a button, and the
        image control will scale with the button control.

* When Tab control TabFixedHeight property set to 0, some controls may be covered by page tabs when rescaled.

	Try setting TabFixedHeight to 0.2 inches or so.
	Also, try setting the constant "conTabCtlLoopAdj"
	to "True". 

* Only one tab control is allowed per form.

* Maximizing a form prior to calling SS_OnOpen routine can cause distortions.

	If you are maximizing your form in the OnOpen
	event procedure, make sure that the call to the
	SS_OnOpen subroutine preceeds the docmd.maximize command.

* Some fonts that do not have small sizes will not shrink.

	"System" and "MS Sans Serif" (two common fonts) are changed to
	"Arial" by ShrinkerStretcher when shrunk below their
	respective smallest sizes. I have not tested every font yet to
	see what is the lower font size limit for each.

* Text may be truncated because box area around text is squeezed too small for entire text to appear.

	Try setting the compile time constant "conRetainProportion"
	to "True", or else boxes containing text should be
	made wide enough to display text even when form width is
	disproportionately shrunk.

* Semi-static rescaling does not work for .mde files.

	This is because the form design is not available in .mde files.

* Continuous forms that open stand-alone should have AutoResize property set to "No".

	Inconsistencies may occur when property is set to "Yes".

* If you have a subform control in which you change the subform source object property during runtime, you DO need to put the ShrinkerStretcher calls in the subform.

* Tab controls near the bottom of form may be distorted when form is scaled to large sizes

	Setting the constant "conTabCtlLoopAdj" to "True" might
	help, or else move the tab control slightly away from the
	lower form border.

* Tab controls with contained controls placed against the tab control inner border may be distorted when form is scaled to small sizes.

	Setting the constant "conTabCtlLoopAdj" to "True" might
	help, or else move the contained controls slightly away from the
        inner tab control border.

* Option groups that are placed close to the right, or bottom form border may distort when scaled. 

	Setting the constant "conOptGroupLoopAdj" to "True" might
	help, or else move the control slightly away from the
	lower form border.

* If an Option Group control is placed on a form that is automatically resized to the users resolution, near the right side, it causes the form to be displayed wider than what is shown in Design View.

	Setting the constant "conOptGroupLoopAdj" to "True" might
	help, or else move the control slightly away from the
	right form border.


-----------------------------------------------------------------------

8. New Features in this Version
===============================
Version 81:
-Fixed bug that caused error 2125 ("The setting for the FontSize property must be from 1 through 127") to sometimes appear  when rescaling datasheet subforms
-Added some additional error checking.

Version 8:
-Datasheet rescaling support (dynamic rescaling only)
-Option to turn off scaling from OnUnload event procedure
-Improved subform and Tab scaling
-Retain Subform Proportion feature allows subform to extend beyond subform control borders. 
-Autocenter forms more accurately positioned
-"Flickering" problem on some forms reduced.
-Fix focus bug on maximized forms with tab controls
-Scaleable msgbox form included

Version 7:
* Option to inhibit scaling when forms are opened at design resolution.
* "Flickering" reduced.
* Page captions and fonts will rescale, works best when TabFixedWidth, and TabFixedHeight are set to values other than 0.
* Minimum font size feature added
* Can specify the original development environment display width and height for each form.
* Improved handling of subforms, tab controls, and option groups.

Version 61:
* Bug that sometimes caused combo box contents to dissappear fixed.
* Improved handling of subforms. 

Version 6:
* "Retain Proportion" feature scales form evenly in x and y directions.
* Form windows are hidden during static rescaling.
* Improved handling of unbound subforms. 

Version 5:
* Static rescaling of all forms, marked forms, or individual forms along with Access client area size tracking allows ShrinkerStretcher to run once at application startup and only when client area size has changed.
* Tab controls in Access 8.0 are supported
* Subforms containing option groups are supported
* Works with forms that are autocentered.

Version 4:
* Access 7.0 version can be converted to Access 8.0.
* Improved handling of subforms.
* ShrinkerStretcher function calls are no longer required in subforms. The parent form function calls will recursively process subform controls. 
* Parent forms that open subforms by updating the subform source object are supported.
* Subforms within subforms are supported.
* Bug in Access 7.0 version concerning subforms on maximized parent forms fixed.
* Bug which caused occasional division by zero error fixed.
* "SSOneTimeOnly" text option in form tag property lets you scale your form only when it opens (improves performance, good for maximized forms). 
* Other performance improvements.