Startup position of form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Henk ten Bos

    Startup position of form

    Hi All,

    consider the following situation: I have a form that contains an image.
    I would like to show a second form where at startup the top left corner of
    this second form is positioned exactly at the top left corner of the image
    on the 1st form.
    How do I calculate this position (taking into account that the form might
    have a menubar and toolbars - so form1.top+image .top is not the correct
    value !)

    any ideas (e.g. what is the height of a menubar in twips ?)

    thanks,
    Henk


  • J French

    #2
    Re: Startup position of form

    On Sun, 9 Nov 2003 11:44:54 +0100, "Henk ten Bos" <henktb_1@xs4al l.nl>
    wrote:
    [color=blue]
    >Hi All,
    >
    >consider the following situation: I have a form that contains an image.
    >I would like to show a second form where at startup the top left corner of
    >this second form is positioned exactly at the top left corner of the image
    >on the 1st form.
    >How do I calculate this position (taking into account that the form might
    >have a menubar and toolbars - so form1.top+image .top is not the correct
    >value !)
    >
    >any ideas (e.g. what is the height of a menubar in twips ?)[/color]

    The height of the MenuBar and the borders is
    Form.Height - Form.ScaleHeigh t

    The height of the borders should be the same as their width
    Form.Width - Form.ScaleWidth

    However the API ClientToScreen is simpler - it works in pixels

    Comment

    Working...