* Position the calendar lnTop = OBJTOCLIENT(This, 1) + ThisForm.Top + This.Height + 6 lnLeft = OBJTOCLIENT(This, 2) + ThisForm.Left + 4 IF lnTop + This.Height + This.oCalendar.Height < _screen.Height * Below This.oCalendar.Left = ThisForm.Left + OBJTOCLIENT(This, 2) - This.oCalendar.Width + This.Width This.oCalendar.Top = ThisForm.Top + OBJTOCLIENT(This, 1) + This.Height + SYSMETRIC(9) + 2 ELSE * Above This.oCalendar.Left = ThisForm.Left + OBJTOCLIENT(This, 2) - This.oCalendar.Width + This.Width This.oCalendar.Top = ThisForm.Top + OBJTOCLIENT(This, 1) + SYSMETRIC(9) + 2 - This.oCalendar.Height ENDIF * Keep the calendar on the form IF This.oCalendar.Left < 0 This.oCalendar.Left = 0 ENDIF