手机
当前位置:查字典教程网 >编程开发 >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#连接db2数据库的实现方法

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

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

C#对XML文件的各种操作实现方法

C# byte数组与Image相互转换的方法

Winform跨线程操作的简单方法

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

遍历Hashtable 的几种方法

配置C#的系统环境变量的方法

使用SmtpClient发送邮件的方法

精品推荐
分类导航