>Barbara
>
>Sorry for the confusion. Let me see if I can explain what I am trying to do.
>
>I have a date control on form1 that has a button beside it to pop up a calendar. The calendar ocx is in another form that I would like to position underneath the date control. By adding the form1.top+objtoclient(datecontrol)+datecontrol.height to the calendarform.top I don’t get to where I want to be. It also seems to be different if the datecontrol is on a pageframe. How do I calculate the calendar top value?
>
>Thanks.
Where do you end up instead? Also, don't you need to figure out where the left of the form should be?
Make sure you include all the containers that the date control is in. You may want to do a recursive call to get the Top or objtoclient until you find the parent's BaseClass property is "Form".
BTW, if you want to use objtoclient instead of Top, I would do that consistently with each object instead of using a mix of top, height and objtoclient. I think you can get it to work either way though.