C#更改groupbox边框颜色
来源:互联网 发布:淘宝的消费总额怎么看 编辑:程序博客网 时间:2024/06/07 09:30
private void groupBox1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.Clear(groupBox1.BackColor);
e.Graphics.DrawString(groupBox1.Text, groupBox1.Font, Brushes.Red, 10, 1);
e.Graphics.DrawLine(Pens.Red, 1, 7, 8, 7);
e.Graphics.DrawLine(Pens.Red, e.Graphics.MeasureString(groupBox1.Text, groupBox1.Font).Width + 8, 7, groupBox1.Width - 2, 7);
e.Graphics.DrawLine(Pens.Red, 1, 7, 1, groupBox1.Height - 2);
e.Graphics.DrawLine(Pens.Red, 1, groupBox1.Height - 2, groupBox1.Width - 2, groupBox1.Height - 2);
e.Graphics.DrawLine(Pens.Red, groupBox1.Width - 2, 7, groupBox1.Width - 2, groupBox1.Height - 2);
}
{
e.Graphics.Clear(groupBox1.BackColor);
e.Graphics.DrawString(groupBox1.Text, groupBox1.Font, Brushes.Red, 10, 1);
e.Graphics.DrawLine(Pens.Red, 1, 7, 8, 7);
e.Graphics.DrawLine(Pens.Red, e.Graphics.MeasureString(groupBox1.Text, groupBox1.Font).Width + 8, 7, groupBox1.Width - 2, 7);
e.Graphics.DrawLine(Pens.Red, 1, 7, 1, groupBox1.Height - 2);
e.Graphics.DrawLine(Pens.Red, 1, groupBox1.Height - 2, groupBox1.Width - 2, groupBox1.Height - 2);
e.Graphics.DrawLine(Pens.Red, groupBox1.Width - 2, 7, groupBox1.Width - 2, groupBox1.Height - 2);
}
0 0
- C#更改groupbox边框颜色
- C#中更改groupbox的边框的颜色
- winform c# groupBox 的边框颜色
- winform c# groupBox 的边框颜色
- winform c# 重绘groupBox 的边框颜色
- c# groupbox 标题居中,并修改边框颜色
- 微软的GroupBox边框颜色的改变 ~!
- 使用Paint事件重画GroupBox来修改边框颜色
- CheckBox更改默认边框颜色
- android EditText 更改边框颜色,光标颜色
- GroupBox去除边框
- c# GroupBox 只修改标题的字体和颜色
- c#更改标题栏颜色
- 重绘groupbox 边框 title
- C#windowsform去掉GroupBox边框
- c#更改标题栏颜色收藏
- C# 群组框 GroupBox
- XE6 GroupBox的Caption颜色
- 二叉树的遍历
- hdu1087 LIS变形
- 快速熟悉项目代码
- 对于MathType中公式与文字错位的问题怎么解决
- Spring源代码解析(三):Spring JDBC
- C#更改groupbox边框颜色
- 3.7.5 event_loop:事件循环
- 64位win7系统中JDK的安装及环境变量的配置
- Android Studio常用插件
- Linux下undefined reference to ‘pthread_create’问题解决
- 浏览器、操作系统DNS缓存时间
- hdu1029 技巧
- ListView使用ViewHolder模式提高效率
- SQL实现Split功能