public static void DrawDesignTimeBorder(Graphics g, Rectangle rect) { rect.Width --; rect.Height --; var p = new Pen(SystemColors.ControlDarkDark) {DashStyle = DashStyle.Dash}; g.DrawRectangle(p, rect); p.Dispose(); }