手机
当前位置:查字典教程网 >编程开发 >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#绘制椭圆的方法】相关文章:

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

使用SmtpClient发送邮件的方法

C# javascript 读写Cookie的方法

C#连接db2数据库的实现方法

C# 判断字符串为空的几种办法

基于反射解决类复制的实现方法

c#中分割字符串的几种方法

C#定位txt指定行的方法小例子

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

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

精品推荐
分类导航