Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

position of a child form in MDI

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Igor Gegusin - 10 Dec 2004 15:51 GMT
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.
Signature

Igor Gegusin

Nigel Armstrong - 13 Dec 2004 15:37 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.