title: Difference between .Owner property and ShowDialog(IWin32Window owner)?
body: <p>I presume a winform's owner can be set explicitly via the <strong>.Owner</strong> property OR by passing the owner in the overloaded method <strong>ShowDialog(IWin32Window owner)</strong></p>
  
  <p>I am unable to understand why these methods exhibit different behavior when working with <strong>MDI forms</strong>.</p>
  
  <p>I have created an MDIParent and an MDIChild. </p>
  
  <p>I also have a simple winform MyDialogBox that displays its owner on load. </p>
  
  <pre><code>MessageBox.Show("Dialog's owner is " + this.Owner.Name);
  </code></pre>
  
  <p>Method A -  In the load of MDIChild I have the following code, which causes the MyDialogBox's owner to be set to <strong>MDIChild</strong></p>
  
  <pre><code>MyDialogBox box = new MyDialogBox();
  box.Owner = this; // Set owner as MDIChild
  box.ShowDialog();
  </code></pre>
  
  <p>Method B -  Alternatively, in the load method of MDIChild I have the following code, which causes the MyDialogBox's owner to be set to <strong>MDIParent</strong></p>
  
  <pre><code>MyDialogBox box = new MyDialogBox();
  box.ShowDialog(this); // Pass MyMDIChild as owner
  </code></pre>
  
  <p>I also read the following <a href="http://vbnet.mvps.org/index.html?code/forms/mdiownedwindows.htm" rel="noreferrer">here</a></p>
  
  <p><em>Only the MDI parent form can own another form, be it a MDI child, a modal dialog or a form where the parent was set as the Owner param.</em></p>
  
  <p>If so Method A should not work at all, isn't it ?</p>
  
  <p>What am I missing? Why doesn't method B set the owner to MDIChild ?</p>