C#实现一个矩形不断向下延伸完整源程序
2009-03-11 21:01
267 查看
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
int second = DateTime.Now.Second;
SolidBrush brush = new SolidBrush(Color.Blue);
Pen pen = new Pen(Color.Blue);
g.FillRectangle(brush, 100, 20, 30, second );
}
private void timer1_Tick(object sender, EventArgs e)
{
this.Refresh();
}
//timer的Enabled属性为ture;
//设置窗体的doublebuffer为true
…………类似可以实现指针时钟动画,具体请到博客(http://download.csdn.net/user/shuanghusun)下载,包含部分源代码及.exe文件.
{
Graphics g = e.Graphics;
int second = DateTime.Now.Second;
SolidBrush brush = new SolidBrush(Color.Blue);
Pen pen = new Pen(Color.Blue);
g.FillRectangle(brush, 100, 20, 30, second );
}
private void timer1_Tick(object sender, EventArgs e)
{
this.Refresh();
}
//timer的Enabled属性为ture;
//设置窗体的doublebuffer为true
…………类似可以实现指针时钟动画,具体请到博客(http://download.csdn.net/user/shuanghusun)下载,包含部分源代码及.exe文件.
相关文章推荐
- C#实现一个图形的动态效果(简单矩形不断向下运动的实现简单步骤)
- html实现一个不断滚动的虚线矩形
- C# 实现完整功能的截图控件(1)-实现绘图工具栏控件 控件实现了截图、绘制矩形、圆形、箭头、线条、文字,还需要可以撤销绘制步骤、保存图形等功能,基本实现了跟QQ2008截图一样的功能,还可以更
- C#实现只许一个实例运行
- 利用全注解实现ssh的一个完整例子
- 如何编写出高效的数据库连接池(附带完整代码C#和Java实现)
- 要使用C#实现一个ActiveX控件
- Android摄像头:只拍摄SurfaceView预览界面特定区域内容(矩形框)---完整实现(原理:底层SurfaceView+上层绘制ImageView)
- C#如何实现同一个按钮改变值
- c#实现一个自动关机的小工具
- C# 如何实现一个线程暂停和继续
- c# 用 FileStream类简单实现向一个文本里写字符串
- Android UI开发: 横向ListView(HorizontalListView)及一个简单相册的完整实现 (附源码下载)
- 一个完整的壁纸应用——[仿爱壁纸],从设计到实现的过程
- [C#]StringWriter实现的一个功能
- C#遍历文件夹及其子目录的完整实现方法
- 怎样用C#实现完整文档打印功能【转】
- Oracle_C# 实现 Oracle Text(全文检索)的一个简单例子
- C#实现一个最简单的HTTP服务器
- 判断一个点是否在多边形内部,射线法思路,C#实现