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:
01344748
Views:
14
This message has been marked as the solution to the initial question of the thread.
>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
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform