title: Setting a windows region without disabling theming
body: <p>Does anyone know how to assign a window region (<code>SetWindowRgn</code> or <code>Control.Region</code> in WinForms) without killing the theming in the non-client area?</p>
  
  <p>For example, running the following generates a Windows 2000-style unthemed title bar, border, etc:</p>
  
  <pre><code>var form = new Form { Width=500, Height=500, BackColor = Color.Azure };
  form.Text = "But soft, what light through yonder window breaks?";
  var region = new Region (new Rectangle (Point.Empty, form.Size));
  region.Exclude (new Rectangle (100, 100, 300, 300));
  form.Region = region;
  form.ShowDialog();
  </code></pre>
  
  <p>I'm guessing it's to do with <a href="http://msdn.microsoft.com/en-us/library/bb773175%28VS.85%29.aspx">this MSDN article</a> which says:</p>
  
  <blockquote>
    <p>As long as a window has a non-NULL
    region applied to it (SetWindowRgn),
    the UxTheme Manager assumes that this
    is a specialized window and the window
    will not use visual styles.</p>
  </blockquote>
  
  <p>...hence UxThemes assumes it's a specialized window. Is there a way to tell the UxTheme Manager explicitly to theme a window?</p>