I have a daughter form that I am calling with the following line:
This daughter form has a BorderStyle property set to BsDialog, so I can read true or false if the OK or Cancel button is used to close the form in my if statement above.
I've set the Position property of this form to poMainFormCenter and also poOwnerForm Center.
Whilst this works (it centers the daughter on the parent form as I require) , it only does this on the first call of the daughter window. If I need to close it and call it again, which I do, it 'remembers' where it was last time, so if I move the parent form it is no longer centered on main form.
Can I fix this in any way?
Steve (Delphi 2007 & XP)
Code:
if DetailsForm.Execute then
This daughter form has a BorderStyle property set to BsDialog, so I can read true or false if the OK or Cancel button is used to close the form in my if statement above.
I've set the Position property of this form to poMainFormCenter and also poOwnerForm Center.
Whilst this works (it centers the daughter on the parent form as I require) , it only does this on the first call of the daughter window. If I need to close it and call it again, which I do, it 'remembers' where it was last time, so if I move the parent form it is no longer centered on main form.
Can I fix this in any way?
Steve (Delphi 2007 & XP)