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


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

Re: Determine SCREEN location of continuous form control?

From Ulrich Möller <knobbi38@arcor.de>
Newsgroups comp.databases.ms-access
Subject Re: Determine SCREEN location of continuous form control?
Date 2018-02-02 13:25 +0100
Organization A noiseless patient Spider
Message-ID <p51lbe$c8e$3@dont-email.me> (permalink)
References (7 earlier) <09d564b8-391f-4b9c-98fb-4ac8f06871c1@googlegroups.com> <p0bada$7id$1@dont-email.me> <f1751ddd-ec86-4834-b461-a834c28a47d9@googlegroups.com> <p4t3rh$ah7$1@dont-email.me> <0a5f8f64-0b49-4124-a0b7-ab28185283ba@googlegroups.com>

Show all headers | View raw


Hi Malcom,

Am 02.02.2018 um 07:00 schrieb Malcolm Reeve:
> In this revised example, what is TwipsPerPixel_Y
> would that be converting the top value (y) of the active control?

Yes. TwipsPerPixel  is a function which returns the number of twips per 
pixel depending on the screen resolution. There are two values, one for 
the horizontal and one for vertical orientation. Y is the vertical axis.

> I've found a few functions for both TwipsPerPixel_Y & X, but don't 
> know what variable to feed into them. Not having much success with the 
> trial and error method.

To use the function multiply the pixel value with the returned value. ( 
Pixel = Twips * TwipsPerPixel())

> Is seem overly simple to say...
> use screen.activecontrol.accLoaction px, py (left, top)
> int the .Move of the new form.....but why does that not work??

If you use a header in a form then the returned py value from 
control.accLocation is rowcount * (headerheight + rowheight). If you 
want to now the top value of each row you have to make some calculation 
with this value. Because the returned  values are relative to the parent 
window, you need to use form.accLocation for your calculations:

> The form coordinates can be calculated with
> screen.activeform.accLocation (f)  and the control itself with
> screen.activecontrol.accLoaction (c).
>
> Assuming that h is the header size in pixels, the control's y offset is
> calculated as follows
>
> lngTop = c_py - ((c_py - f_py) \ (c_ph + h)) * h - f_py

These are all pixel values. So for any assignments to top/left 
properties in access the values need to be converted into twips.

Ulrich

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


Thread

Determine SCREEN location of continuous form control? Malcolm Reeve <malcolmreevecyc@gmail.com> - 2017-11-30 13:11 -0800
  Re: Determine SCREEN location of continuous form control? Patrick Finucane <patrickfinucanetx@gmail.com> - 2017-11-30 14:48 -0800
  Re: Determine SCREEN location of continuous form control? pstanton54@gmail.com - 2017-12-04 16:12 -0800
    Re: Determine SCREEN location of continuous form control? Mal Reeve <mal.reeve@gmail.com> - 2017-12-06 04:09 -0800
  Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2017-12-06 13:47 +0100
    Re: Determine SCREEN location of continuous form control? Mal Reeve <mal.reeve@gmail.com> - 2017-12-06 05:04 -0800
      Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2017-12-06 14:33 +0100
        Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2017-12-06 21:00 +0100
          Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2017-12-06 21:34 +0100
        Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2017-12-06 21:46 +0100
          Re: Determine SCREEN location of continuous form control? Malcolm Reeve <malcolmreevecyc@gmail.com> - 2017-12-06 13:47 -0800
      Re: Determine SCREEN location of continuous form control? Mike P <mikewpayne@tiscali.co.uk> - 2017-12-06 07:04 -0800
        Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2017-12-06 20:29 +0100
          Re: Determine SCREEN location of continuous form control? Mike P <mikewpayne@tiscali.co.uk> - 2017-12-06 14:07 -0800
            Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2017-12-07 01:52 +0100
              Re: Determine SCREEN location of continuous form control? Mal Reeve <mal.reeve@gmail.com> - 2017-12-06 23:04 -0800
                Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2017-12-07 12:58 +0100
                Re: Determine SCREEN location of continuous form control? Malcolm Reeve <malcolmreevecyc@gmail.com> - 2018-01-30 21:17 -0800
                Re: Determine SCREEN location of continuous form control? Malcolm Reeve <malcolmreevecyc@gmail.com> - 2018-01-30 22:20 -0800
                Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2018-01-31 20:02 +0100
                Re: Determine SCREEN location of continuous form control? Malcolm Reeve <malcolmreevecyc@gmail.com> - 2018-02-01 22:00 -0800
                Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2018-02-02 13:22 +0100
                Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2018-02-02 13:25 +0100
                Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2018-02-02 22:20 +0100
                Re: Determine SCREEN location of continuous form control? Malcolm Reeve <malcolmreevecyc@gmail.com> - 2018-02-02 15:38 -0800
                Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2018-02-08 00:01 +0100
                Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2018-02-02 13:41 +0100
                Re: Determine SCREEN location of continuous form control? Ron Paii <ron81pai@gmail.com> - 2018-02-02 05:03 -0800
                Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2018-02-02 14:52 +0100
                Re: Determine SCREEN location of continuous form control? Ron Paii <ron81pai@gmail.com> - 2018-02-02 08:44 -0800
                Re: Determine SCREEN location of continuous form control? Ulrich Möller <knobbi38@arcor.de> - 2018-02-02 18:51 +0100

csiph-web