Hi,
Sometime back I was using the Door library to get the top and left positions of the form (Example #1) so that when the form is moved to another location, the new form is position in the 'new' location (Example #2).
Example #1:
If Not(cPPC) Then
door.FromControl("fm2")
End If
fm9.Show
PosTop = fm2.top
PosLeft = fm2.left
Example #2:
If Not(cPPC) Then
door.FromControl("fm7")
door.SetProperty("StartPosition","Manual")
fm7.top = fm2.top
fm7.left = fm2.left
End If
Question: Is there a way where I can set them as Subroutines so that I can get the position from previous form, and then set the position to the next form.
Example:
Sub GetPositionNow(FormName)
If Not(cPPC) Then
door.FromControl(FormName)
PosTop = door.FromControl(FormName).top
PosLeft = door.FromControl(FormName).left
End If
End Sub
Sub SetPositionNow(FormName)
If Not(cPPC) Then
door.FromControl(FormName)
door.SetProperty("StartPosition","Manual")
Form.top = PosTop
Form.left = PosLeft
End If
End Sub
Any help is appreciated.