• Advertisement
Sign in to follow this  

[.net] Window coordinate on desktop

This topic is 4172 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I have a main form including a sub form. How would I get the position of the top-left corner of the inner part of the main window in desktop coordinates. I want this point so I can place the sub form within the main form. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Just putting a window ontop of another one doesn't mean it's "within" in, it just means it's ontop of it. If you want to have a parent window with a number of child windows, you're going to want to use to do a couple of things:
  1. Set IsMdiContainer to True in the parent window
  2. In the code for the child form, set the MdiParent property to the parent window's instance

Once you make sure that the parent is an MdiContainer and the child is referencing it with the MdiParent property, you'll have the ability to put forms "within" the MDI parent.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement