个人代码库のC#背景色渐变的功能
2010-11-20 22:36
309 查看
/// <summary> /// 实现“背景色渐变”的功能。【尚不完善】 /// </summary> /// <param name="e"></param> protected override void OnPaintBackground(PaintEventArgs e) { int y, dy; //y=this.Height-this.ClientRectangle.Height; y = this.ClientRectangle.Location.Y; dy = this.ClientRectangle.Height / 256; for (int i = 255; i >= 0; i--) { Color c = new Color(); c = Color.FromArgb(Convert.ToInt32(textBox1.Text.ToString()), i,Convert.ToInt32(textBox2.Text.ToString())); SolidBrush sb = new SolidBrush(c); Pen p = new Pen(sb, 100); e.Graphics.DrawRectangle(p,this.ClientRectangle.X, y, this.Width,y+dy); y = y + dy; } }
相关文章推荐
- 个人代码库のC#背景色渐变的功能
- 个人代码库のC#计算MD5和SHA1
- 个人代码库の可移动 + 滑动 + 反弹按钮“c#相关代码”
- 个人代码库のC#可移动按钮“相关代码”
- 个人练习代码库/渐变(自定义View)
- 个人代码库のC#只允许运行一个窗体实例
- C#制作QQ截图的自动框选功能的个人思路(一)<思路介绍>
- C#制作QQ截图的自动框选功能的个人思路(二)<设置Hook>
- C# 将Label变成有渐变背景色的圆角矩形
- C#WinFrom 打造个人裸奔浏览器 -界面加功能
- 个人代码库の模拟QQ振屏功能
- C#制作QQ截图的自动框选功能的个人思路(三)<自动框选>
- C#软件开发实例.个人定制自己的屏幕抓图工具(八)加入了截图功能键盘
- 个人代码库のC#千千静听 - 桌面歌词 (功能模拟)
- 为Web网站添加IP过滤功能实践总结(C#)
- C#利用广播实现群发功能
- C# winForm实现的气泡提示窗口功能示例
- C#.NET 大型通用信息化系统集成快速开发平台 4.0 版本 - 独立子系统管理员功能实现
- C#.NET 大型通用信息化系统集成快速开发平台 4.1 版本 - 访问记录功能改进
- C#记住密码功能实现