c#圆角
来源:互联网 发布:js 判断ie浏览器 编辑:程序博客网 时间:2024/04/28 07:38
其他类型类似
private void ListBoxDrawTest(ListBox lb, int len)
{
Graphics g=lb.CreateGraphics();
Rectangle rect=lb.ClientRectangle;
GraphicsPath path = new GraphicsPath();
path.AddArc(rect.Left, rect.Top, 2 * len, 2 * len, 180, 90);
path.AddLine(rect.Left + len, rect.Top, rect.Right - len, rect.Top);
path.AddArc(rect.Right - 2 * len, rect.Top, 2 * len, 2 * len, 270, 90);
path.AddLine(rect.Right, rect.Top + len, rect.Right, rect.Bottom - len);
path.AddArc(rect.Right - 2 * len, rect.Bottom - 2 * len, 2 * len, 2 * len, 0, 90);
path.AddLine(rect.Left + len, rect.Bottom, rect.Right - len, rect.Bottom);
path.AddArc(rect.Left, rect.Bottom - 2 * len, 2 * len, 2 * len, 90, 90);
path.AddLine(rect.Left, rect.Top + len, rect.Left, rect.Bottom - len);
lb.Region = new Region(path);
//g.DrawPath(Pens.Black, path);
}
{
Graphics g=lb.CreateGraphics();
Rectangle rect=lb.ClientRectangle;
GraphicsPath path = new GraphicsPath();
path.AddArc(rect.Left, rect.Top, 2 * len, 2 * len, 180, 90);
path.AddLine(rect.Left + len, rect.Top, rect.Right - len, rect.Top);
path.AddArc(rect.Right - 2 * len, rect.Top, 2 * len, 2 * len, 270, 90);
path.AddLine(rect.Right, rect.Top + len, rect.Right, rect.Bottom - len);
path.AddArc(rect.Right - 2 * len, rect.Bottom - 2 * len, 2 * len, 2 * len, 0, 90);
path.AddLine(rect.Left + len, rect.Bottom, rect.Right - len, rect.Bottom);
path.AddArc(rect.Left, rect.Bottom - 2 * len, 2 * len, 2 * len, 90, 90);
path.AddLine(rect.Left, rect.Top + len, rect.Left, rect.Bottom - len);
lb.Region = new Region(path);
//g.DrawPath(Pens.Black, path);
}
- c#圆角
- C# 构造 圆角 窗体
- c# winForm 圆角Panel
- c# winForm 圆角Panel
- C#
- C#
- C#
- C#
- C#
- C#
- C#
- C#
- C#
- C#
- C#
- c#
- c#
- C#
- 写得蛮好的linux学习笔记
- 动词分类
- 空指针深度剖析
- 近来玩星际争霸,发觉一个原来同事的水平提高好快,而自己。。貌似止步不前 apm仍然在160左右
- 北京你好众娱文化传播有限公司急速招聘
- c#圆角
- SQL SERVER优化建议
- 使用AJAX和J2EE实现一个网上会议室系统
- 使用Eclipse SDK开发J2ME
- 突破一流信息监控拦截系统进行SQL注射
- 国际网页Web设计流程
- 遍历文档模板、文档和视图
- 可爱的中国人
- ReportBuilder 中ppMemo不支持中文换行的Bug 的修正