关于边框重绘然后消除重绘的有关问题请问

关于边框重绘然后消除重绘的问题请教
我在form的paint事件里用
 ControlPaint.DrawBorder(e.Graphics, this.ClientRectangle, Color.FromArgb(22, 55, 71), ButtonBorderStyle.Solid);

绘制了一个边框(窗体边框已消除),然后我最大化之后,这个绘制的边框大小是固定的,我想消除它然后重新绘制,或者用什么办法能让它根据窗体的大小自适应?
------解决思路----------------------

public Form1() {
    InitializeComponent();
    //加上这个
    this.SetStyle(ControlStyles.ResizeRedraw, true);
}
protected override void OnPaint(PaintEventArgs e) {
    e.Graphics.DrawRectangle(
        Pens.Blue, 0, 0, this.ClientSize.Width - 1, this.ClientSize.Height - 1
    );
    base.OnPaint(e);
}