ControlPaint.DrawBorder详细参数设置

来源:互联网 发布:请确保已安装填充数据 编辑:程序博客网 时间:2024/05/16 23:59

ControlPaint.DrawBorder详细参数设置:


private void formMain_Paint(object sender, PaintEventArgs e){    Rectangle myRectangle = new Rectangle(0, 0, this.Width, this.Height);    //ControlPaint.DrawBorder(e.Graphics, myRectangle, Color.Blue, ButtonBorderStyle.Solid);//画个边框    ControlPaint.DrawBorder(e.Graphics, myRectangle,        System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(200)))), ((int)(((byte)(105))))), 1, ButtonBorderStyle.Solid,  //left        System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(200)))), ((int)(((byte)(105))))), 0, ButtonBorderStyle.Solid,  //top        System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(200)))), ((int)(((byte)(105))))), 1, ButtonBorderStyle.Solid,  //right        System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(200)))), ((int)(((byte)(105))))), 1, ButtonBorderStyle.Solid   //bottom    );}



0 0