Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Apr : How do I get MDIForm Client Area Coordinates?
| Subject: | How do I get MDIForm Client Area Coordinates? |
| Posted by: | "Dave Atkin" (sepultur..@optusnet.com.au) |
| Date: | Sat, 2 Apr 2005 19:06:47 |
Hi everybody,
I want to show a Modal Form in the client area of an MDI form, and align the
Modal Form's Top Right corner with the Top Right corner of the MDI Form's
client area. I can't use an MDIChild form, because they can't be shown
modally. Is there an easy way to get the absolute coordinates of the
MDIForm's client area (the part where the MDI Children are shown)?
At the moment I'm doing this:
frmModal.Top := frmMDI.Top + (frmMDI.Height - frmMDI.ClientHeight) +
frmMDI.Toolbar1.Height;
frmModal.Left :+ frmMDI.Width - frmModal.Width;
frmModal.ShowModal:
but it seems a bit clumsy.
Any help appreciated.
Regards,
Dave Atkin