I haven't tried it but I think TWindowInfo will give you the same problem.
This is just a thought:
1. Create the Form with BorderStyle:= bsSizable completely off-screen or Invisible.
2. Store the Size info.
3. Change the BorderStyle:= bsDialog.
4. Move the Form to the location you want based on the stored Size info.
done as you said, works like a charm for
bsSizeable but for
bsDialog result is not upto mark.
attaching screenshot so you can understand,
Image 1.png has borderstyle = dialog
and image 2.png has borderstyle = sizeable
I can't understand, if the values are correct, then why there is error of margin.
what is creating this difference between dialog and sizeable window.
Is there any way to avoid resize on borders as it is a sizeable window.