Thanks, it works perfect
>>Hi All,
>>
>>I need help to achieve what I thought would be straight forward.
>>
>>I have 2 windows (foxpro windows). The parent launches the child form in modeless state, the child form is also set to be AlwaysOnTop.
>>
>>What I would like is that when the user moves the parent form, the child should also be 'draged' or 'moved' along to a new relative position. I have already worked what the child's new position should be, just that putting the code in the parent's moved() event doesn't move the child at all.
>>
>>Any ideas please
>>
>>Thanks
>>
>>Mathias
>
>Add a property in Parent form where you should keep reference to child one.
>Then where you call child form put:
>
>thisform.ChildForm = NULL
>DO FORM ChildForm NAME thisform.ChildForm [WITH ....]
>
>
>Then in Moved Event of the Parent Form put this:
>
>IF TYPE("thisform.ChildForm") == "O" .AND. .NOT. ISNULL(thisform.ChildForm)
> thisform.ChildForm.Top = SomeValueForTopOfTheChiledForm
> thisform.ChildForm.Left = SomeValueForLeftOfTheChiledForm
>ENDIF
>
Mathias Banda
Time is longer than a rope.