有求
DataGridView设置圆⾓边框线等 private int _Radius = 20; // 圆⾓弧度
/// <summary>圆⾓弧度(0为不要圆⾓)</summary>
[Browsable(true)]
[Description("圆⾓弧度(0为不要圆⾓)")]
public int Radius
奋斗爱{
get
{
return _Radius;
}
t
{
if (value < 0) { _Radius = 0; }
el { _Radius = value; }
ba.Refresh();
}
}
protected override void OnPaint(System.Windows.Forms.PaintEventArgs pe)
{
ba.OnPaint(pe);
Round(this.Region); // 圆⾓
Color top = Color.FromArgb(240, 244, 251);
ControlPaint.DrawBorder(pe.Graphics,
this.ClientRectangle,
top,
1,
ButtonBorderStyle.Solid,
top,
1,
ButtonBorderStyle.Solid,
top,
华为无线路由1,
ButtonBorderStyle.Solid,
就业培训中心
top,
1,
ButtonBorderStyle.Solid
);
//Graphics e = pe.Graphics;
//e.DrawRectangle(new Pen(Color.Red), new Rectangle(dataGridView1.Location.X, dataGridView1.Location.Y, dataGridView1.Width - 1, dataGridView1.Height - 1));
}
public void Round(System.Drawing.Region region)
{
韩国学
System.Drawing.Drawing2D.GraphicsPath oPath = new System.Drawing.Drawing2D.GraphicsPath();
int x = 0;
int y = 0;
int thisWidth = this.Width;
int thisHeight = this.Height;
int angle = _Radius;
if (angle > 0)
数据管理办法
{
System.Drawing.Graphics g = CreateGraphics();
oPath.AddArc(x, y, angle, angle, 180, 90); // 左上⾓
oPath.AddArc(thisWidth - angle, y, angle, angle, 270, 90); // 右上⾓
oPath.AddArc(thisWidth - angle, thisHeight - angle, angle, angle, 0, 90); // 右下⾓
最新个性签名
oPath.AddArc(x, thisHeight - angle, angle, angle, 90, 90); // 左下⾓
oPath.CloAllFigures();
Region = new System.Drawing.Region(oPath);
}
// -----------------------------------------------------------------------------------------------
el
{
oPath.AddLine(x + angle, y, thisWidth - angle, y); // 顶端
oPath.AddLine(thisWidth, y + angle, thisWidth, thisHeight - angle); // 右边
oPath.AddLine(thisWidth - angle, thisHeight, x + angle, thisHeight); // 底边
oPath.AddLine(x, y + angle, x, thisHeight - angle); // 左边
oPath.CloAllFigures();
Region = new System.Drawing.Region(oPath);情侣网名古风诗意
}
}