LOCAL luValue, lnTop, lnLeft *** Calculate where the popup form should be instantiated *** So it pops up directly below this control *** SYSMETRIC( 9 ) is the height of the Form's title bar in case you were curious lnTop = OBJTOCLIENT( Thisform, 1 ) + OBJTOCLIENT( This, 1 ) + This.Height + ; IIF( Thisform.TitleBar = 1, SYSMETRIC( 9 ) + 2, 2 ) lnLeft = OBJTOCLIENT( Thisform, 2 ) + OBJTOCLIENT( This, 2 ) DO FORM MyForm WITH lnTop, lnLeft TO luValueCode in the init of the child form:
LPARAMETERS tnTop, tnLeft WITH Thisform *** Position it correctly .Top = tnTop .Left = tnLeft ENDWITH