I have a main form 'MainForm' with IsMdiContainer = true
I have one or more dynamically created child forms where I set MdiParent = MainForm
Now what I want to do is to be able to detach these child forms by setting MdiParent = null, but with maintaining the exact same screen location.
I've tried to use ChildForm.PointToScreen(ChildForm.Location), but that gives me the screen location relative to the client area of the form.
EDIT
PointToScreen() on the form itself gives me almost the correct location, except that it gives the screen location of 0,0 inside the form, while .Location refers to the outer edge of the form.