手机
当前位置:查字典教程网 >编程开发 >C#教程 >C#绘制椭圆的方法
C#绘制椭圆的方法
摘要:本文实例讲述了C#绘制椭圆的方法。分享给大家供大家参考。具体实现方法如下:usingSystem;usingSystem.Collectio...

本文实例讲述了C#绘制椭圆的方法。分享给大家供大家参考。具体实现方法如下:

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication2 { public partial class Form4 : Form { public Form4() { InitializeComponent(); } bool drawElipse = false; private void button1_Click(object sender, EventArgs e) { this.drawElipse = !this.drawElipse; using (Graphics g = this.CreateGraphics()) { if (this.drawElipse) { g.FillEllipse(Brushes.DarkBlue, this.ClientRectangle); } else { g.FillEllipse(SystemBrushes.Control, this.ClientRectangle); } } } private void Form4_Load(object sender, EventArgs e) { } } }

希望本文所述对大家的C#程序设计有所帮助。

【C#绘制椭圆的方法】相关文章:

C#操作注册表的方法

C#计算代码执行时间的方法

C#生成sitemap站点地图的方法

C#图片压缩的实现方法

C#技巧之快速删除bin和obj文件夹的方法

C#给picturebox控件加图片选中状态的2个方法

C# 透明窗体制作实现方法比较分析

C#操作config文件的具体方法

深入C# 内存管理以及优化的方法详解

.NET(C#):Emit创建异常处理的方法

精品推荐
分类导航