position of a child form in MDI

G

Guest

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top