Ken Getz 76137,3650

**Description:
RTSize.MDB demonstrates a way to allow users to move/resize
form controls at runtime.

To try it out, play with frmStretchTest.  Open it in run mode,
and convince yourself that you can move and resize all the
controls on the form, using the mouse.

You can move the mouse over any portion of the edge of the
control, and you should see the mouse pointer change shape
to indicate that you can move or
resize.

Using the right or bottom portion of the control, you can resize.
Using the top or left, you can move the control.

**Using the code:
To use these techniques in your own apps, follow these steps:

1.) Import basStretch into your app.
2.) For any control to which you wish to endow these capabilities,
    set the following event procedures in the form's module:

YourControl_Click:
  If ahtSkipClick() Then Exit Sub
  ' Your own code could follow here.

YourControl_MouseDown:
  ahtSetMouseDown

YourControl_MouseMove:
  ahtMouseMove Me!YourControl, X, Y

YourControl_MouseUp:
  ahtSetMouseUp

That's it!  Study the examples in frmStretchTest's module to see
how they compare to these examples.  All the work takes place
in basStretch.

**Limitations:

1. MOST IMPORTANT: Because Access maintains separate designtime
and runtime information, NO CHANGES you make at runtime
will be reflected on the form at designtime, nor can those
changes be saved, without some extraordinary work on your part.
That is, this example WILL NOT save changes you make at
runtime.  Resize/move controls all you like, but it's just
for the current session. It's just for fun, remember?

2. Due to the way Access tracks mouse positions, you can only use
this code with command buttons, toggle buttons, rectangles and
labels. The other control types are blocked out by code in
basStretch.  You can set them up to call the code, but it'll
just exit out immediately for any other control type than
the selected few.

Have fun!

If you have suggestions or comments, please let me know.

This example is part of a group that'll be in the
Waite Group Press' Access How-To, written by Ken Getz,
Helen Feddema, Dan Haught and Mike Gunderloy, due out
later this year.


