Results 1 to 2 of 2

Thread: exact positioning of one form above another - sounded simple

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Location
    Gaithersburg, MD
    Posts
    10

    Question

    I would like to move a pop-up form to various locations in reference to the locations of controls (frames) on the main form underneath. I thought I could simply code: frmPopUp.Left = frmMain.Left + frmMain.Frame1.left

    to align the left edge of my pop-up with the left edge of the frame on the main form measuring from the left of the screen (since frmMain.Left is the distance from the left edge of the screen and frmMain.Frame1.Left is the additional distance from there to the left edge of the frame, the total being the distance from the left edge of the screen to the left edge of the frame)

    Anyway, it doesn't work.

    Thanks in advance for the help.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I guess you use a different scalemode for frmmain, that means frmmain.frame1.left is returned in frmmains scale units. The forms left and top properties are twips. If you need to convert to twips use ScaleX and ScaleY methods of the form.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width