Re: Owner vs Parent vs ParentForm
- From: Tom W <die.spammers@xxxxxxxxxx>
- Date: Wed, 03 Aug 2005 14:12:49 -0500
OK great, owner provides functionality that ties forms togther when minimizing and maximizing. But you can reference Parent and ParentForm from a form class. Can that just be used as another way to tie them together that doesn't provide any functionality?
Tom
Jay B. Harlow [MVP - Outlook] wrote:
Tom, | What's the difference in these three? | Owner vs Parent vs ParentForm
Form.Owner - Is the Form that "owns" this form. For example a modless Find/Replace dialog would be Owned by Notepad's main window. If you minimize the main Form, the owned form will minimize, if you restore the main form, the owned form will restore... Normally used for "tool" windows in SDI applications...
Control.Parent - Is the immediate control that this control is placed on. For example an option button placed in a Panel or GroupBox would have that Panel or GroupBox as its Parent.
ContainerControl.ParentForm - is the Form that this ContainerControl is ultimately placed on, however the Parent of the ContainerControl maybe another ContainerControl, which may have another Control as its Parent, which may then be a Form. Basically this does a Control.Parent until it finds a type that inherits from Form.
Hope this helps Jay
"Tom W" <die.spammers@xxxxxxxxxx> wrote in message news:%23rWowSDmFHA.3380@xxxxxxxxxxxxxxxxxxxxxxx
| What's the difference in these three?
.
- Follow-Ups:
- Re: Owner vs Parent vs ParentForm
- From: Jay B. Harlow [MVP - Outlook]
- Re: Owner vs Parent vs ParentForm
- References:
- Owner vs Parent vs ParentForm
- From: Tom W
- Re: Owner vs Parent vs ParentForm
- From: Jay B. Harlow [MVP - Outlook]
- Owner vs Parent vs ParentForm
- Prev by Date: Re: Lies the documentation told me
- Next by Date: Re: Listview
- Previous by thread: Re: Owner vs Parent vs ParentForm
- Next by thread: Re: Owner vs Parent vs ParentForm
- Index(es):
Relevant Pages
|