ControlPaint.DrawBorder可以绘制么?...
为什么我这样用说没有采用8个参数
 private void panel1_Paint(object sender, PaintEventArgs e)
        {
            ControlPaint.DrawBorder(e.Graphics, panel1.ClientRectangle, Color.Red, 3, ButtonBorderStyle.Solid, Color.Red, 3, ButtonBorderStyle.Solid);
        }谢谢解答

解决方案 »

  1.   

    谢谢解答很有礼貌,顶一个!另外,这个ControlPaint.DrawBorder方法需要八个参数的,你只给了7个,所以提示了。
      

  2.   

    此方法还有四个参数的重载:
    DrawBorder(Graphics, Rectangle, Color, ButtonBorderStyle) 你的代码用的7个参数,不符合这个8个参数的要求:
    DrawBorder(Graphics, Rectangle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle, Color, Int32, ButtonBorderStyle) 
      

  3.   

    private sub Panel1_Paint(Object as sender,e as PaintEventargs)
    e.Graphics.DrawRectange(边框颜色,New Recteange(0,0,Sender.Widht-1,Sender.Height-1)
    End sub