title: How to minimize a window to the taskbar? (i.e. not iconify)
body: <p>i have a window that i want to minimize (to the taskbar), so i call <code>ShowWindow</code>:</p>
  
  <pre><code>ShowWindow(Handle, SW_MINIMIZE);
  </code></pre>
  
  <p>Except that rather than minimizing itself (to the taskbar), the window is <em>iconified</em>:</p>
  
  <p><img src="https://i.stack.imgur.com/5OZqE.png" alt="enter image description here"></p>
  
  <p>The window is unparented:</p>
  
  <p><img src="https://i.stack.imgur.com/CtRJE.png" alt="enter image description here"></p>
  
  <p>How do i minimize a window to the taskbar?</p>
  
  <hr>
  
  <p>Update:</p>
  
  <p><a href="http://www.delphipages.com/forum/showthread.php?t=190283" rel="nofollow noreferrer">Following some advice from 2002</a>, i try setting the <code>WS_EX_APPWINDOW</code> window style and/or ensuring the window has no owner:</p>
  
  <p><img src="https://i.stack.imgur.com/REZIZ.png" alt="enter image description here"></p>
  
  <p>Unfortunately, that changes the behavior of my (Delphi) application because there is now <strong>two</strong> taskbar icons for my application, rather than one:</p>
  
  <p><img src="https://i.stack.imgur.com/idLdz.png" alt="enter image description here"></p>
  
  <p>This, of course, is an artifact of Delphi (5); and because i was <a href="https://stackoverflow.com/questions/3988151/how-to-not-have-a-mainform-in-delphi">trying to solve another issue</a>.</p>
  
  <p>But that shouldn't affect this question. i'm calling the <code>ShowWindow(..., SW_MINIMIZE)</code> API, and rather than minimize the window Windows is <em>iconifying</em> the application.</p>
  
  <p>How do i minimize a window to the taskbar?</p>