title: Drawing border around control
body: <p>Well, i wanted to draw a custom border around a panel control, and i found that it can be easily achieved using </p>
  
  <pre><code>ControlPaint.DrawBorder(e.Graphics, ClientRectangle,
                   Color.Indigo, 10, ButtonBorderStyle.Solid,
                   Color.Indigo, 10, ButtonBorderStyle.Solid,
                   Color.Indigo, 10, ButtonBorderStyle.Solid,
                   Color.Indigo, 10, ButtonBorderStyle.Solid);
  </code></pre>
  
  <p>However, this method and all the other methods i have tried actually draw the border inside the panel so when i dock some control inside it, the control hides the border.</p>
  
  <p><img src="https://i.stack.imgur.com/ULmcE.png" alt="enter image description here"></p>
  
  <p>So i wonder is there a way to draw the border outside the control to avoid this problem? </p>