Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Moving 2 windows
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01344747
Message ID:
01344749
Views:
13
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform