-
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.
-
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.