Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-access > #10175

Re: Postitioning a control in a form

From "Ron Paii" <None@none.com>
Newsgroups comp.databases.ms-access
Subject Re: Postitioning a control in a form
Date 2014-12-10 07:29 -0600
Organization A noiseless patient Spider
Message-ID <m69hs0$c01$1@dont-email.me> (permalink)
References <b76f269d-5fc0-4ce3-88d5-845de07d521e@googlegroups.com>

Show all headers | View raw



"Patrick Finucane" <patrickfinucanetx@gmail.com> wrote in message 
news:b76f269d-5fc0-4ce3-88d5-845de07d521e@googlegroups.com...
> Hi.  I have a form, Form1, that has a box/rectangle control.  I call it 
> Box0.
>
> 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, 
> maybe not.
>
> Anyway, when Form2 is displayed, I may resize it within Box0.  At this 
> point I can get the various coordinates of Form2 using WindowLeft, 
> WindowTop, WindowHeight, and WindowWidth.  Ex:  lngLeft = 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 into frustration.  How can I get LabelL to print/display just 
> above the bottom 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 = Me.WindowHeight - 360
> In the above line, I would think LabelL would display 1/4" (360) from the 
> bottom of Form2.
>
> For some odd reason the WindowHeight of Form2 has no correlation with the 
> height 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 = ...
>
> 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 
> tabbed documents.



1) You need to account for the border and header to get from WindowHeight to 
the detail section.
2) All dimensions are in twips (1440 per inch or 567 per centimeter)

PS: as posted by Ulrich, why not include it as a sub form? 

Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Postitioning a control in a form Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-12-09 15:27 -0800
  Re: Postitioning a control in a form Ulrich Möller <knobbi38@arcor.de> - 2014-12-10 03:32 +0100
  Re: Postitioning a control in a form "Ron Paii" <None@none.com> - 2014-12-10 07:29 -0600
    Re: Postitioning a control in a form Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-12-10 06:14 -0800
      Re: Postitioning a control in a form "Ron Paii" <None@none.com> - 2014-12-10 11:29 -0600
      Re: Postitioning a control in a form Dave W <davewi11@yahoo.co.uk> - 2014-12-13 11:12 +0000
  Re: Postitioning a control in a form Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-12-10 07:20 -0800
    Re: Postitioning a control in a form Ulrich Möller <knobbi38@arcor.de> - 2014-12-10 20:10 +0100
      Re: Postitioning a control in a form Patrick Finucane <patrickfinucanetx@gmail.com> - 2014-12-10 13:53 -0800
        Re: Postitioning a control in a form "Ron Paii" <None@none.com> - 2014-12-10 16:33 -0600
        Re: Postitioning a control in a form Ulrich Möller <knobbi38@arcor.de> - 2014-12-11 00:56 +0100
          Re: Postitioning a control in a form "Phil" <phil@stantonfamily.co.uk> - 2014-12-11 08:57 +0000

csiph-web