Postitioning a control in a form

Giganews Newsgroups
Subject: Postitioning a control in a form
Posted by:  Patrick Finucane (patrickfinucane…
Date: Tue, 9 Dec 2014

Hi.  I have a form, Form1, that has a box/rectangle control.  I call it Box=
0. =20

I want to open a form, Form2, and position it at the Top Left coordinate of=
Form1's Box0.  I think I may have the placement of that issue licked, mayb=
e not.

Anyway, when Form2 is displayed, I may resize it within Box0.  At this poin=
t I can get the various coordinates of Form2 using WindowLeft, WindowTop, W=
indowHeight, and WindowWidth.  Ex:  lngLeft =3D Me.WindowLeft

Inside Form2 I have 2 controls; LabelW and LabelL (for length and width).  =
I need to display LabelW in the middle of Form2's display and LabelL at the=
bottom of Form2.  What I would normally consider an easy task is turning i=
nto frustration.  How can I get LabelL to print/display just above the bott=
om of the form using VBA?  How can I display LabelW so it displays halfway =
down the display area of Form2.  Is there some way of doing so?  Currently =
I'm doing things like
  Me.LabelL.Top =3D Me.WindowHeight - 360
In the above line, I would think LabelL would display 1/4" (360) from the b=
ottom of Form2. =20

For some odd reason the WindowHeight of Form2 has no correlation with the h=
eight of the detail section in Form2.  The detail section is a large number=
using the Design view setting of the height.

At this point I don't know if using Move is the way to go or the setting of=
a control such as LabelL.Top =3D ...

This should be really easy to do.  But I'm lost.

Btw, I am using A2013 and have it set to use Overlapping Windows, not tabbe=
d documents.