Results 1 to 7 of 7

Thread: Child form in front of the controls on parent form

Threaded View

  1. #6
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Child form in front of the controls on parent form

    The the "Me" in form1.Show(Me) is a simple way to make it the Owner of form1.

    The owned form is locked in front of the owner (and its child controls) in the Z order, so no other form can come between them. If you close, show/hide or minimize/restore the owner form, the owned form goes along with it. In fact you can have a whole stack of owned forms.

    The ownership idea seems rather neglected but it's not there for nothing. Besides the Form.Owner and Form.OwnedForms properties, the framework provides Form.AddOwnForm and Form.RemoveOwnedForm methods. An MSDN search with the search string "owned form" (including the quotation marks) yields 72 hits. Without the quotation marks, it yields more than 200,000 hits. That might be interesting reading for someone who can't think of a use. Or see the Slide Show link in my signature below for an example.

    BB

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width