手机
当前位置:查字典教程网 >编程开发 >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#给picturebox控件加图片选中状态的2个方法

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

解决C#全屏幕截图的实现方法

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

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

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

C# 抓取网页内容的方法

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

c#启动EXE文件的方法实例

精品推荐
分类导航