Hi Igor
How about the Location property of the child form?
Nigel Armstrong
> How to get the location (x,y) of the upper-left corner of an active child
> form in MDI respective to the upper-left corner of the parent form?
>
> I work in .Net Framework 1.1, Visual Studio .Net, C# or .VB>Net.
> Thanks.
Igor Gegusin - 13 Dec 2004 16:13 GMT
Thank you, Nigel.
The 'Location' property always returns the pair (0,0) after the parent-child
relation is set.
So it does not help.
I was able to solve the problem during the weekend. It involves simple
arithmetic which includes ClientSize property of the parent MDI form. What I
was looking for was not the ClientSize, but something like 'ClientArea'
object (or, better 'WorkingArea' objetc) which could return not only size but
also top-left corner of ClientArea (WorkingArea). It seems there is nothing
in the object model to work with.
The problem is complicated more when there are other 3rd party controls
docked to the parent form - they occupy client area of MDI parent (this is my
case with Infragistics Toolbar control).
Once again, thanks Nigel.
Igor
> Hi Igor
>
[quoted text clipped - 7 lines]
> > I work in .Net Framework 1.1, Visual Studio .Net, C# or .VB>Net.
> > Thanks.