using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace DrawingPieShapes
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btn_show_Click(object sender, EventArgs e)
{
// Create a Graphics object
Graphics g = this.CreateGraphics();
g.Clear(this.BackColor);
// get the current value of start and sweep angles
float startAngle = (float)Convert.ToDouble(textBox1.Text);
float sweepAngle = (float)Convert.ToDouble(textBox2.Text);
// Create a pen
Pen writePen = new Pen(Color.Blue, 1);
// Draw pie
g.DrawPie(writePen, 20, 20, 100, 100, startAngle, sweepAngle);
// dispose of objects
writePen .Dispose();
g.Dispose();
}
}
}
This Blog is a programing portal, with tutorials and references relating to development subjects, including C#,Silverlight,WCF, Asp.Net,HTML, XML, CSS, JavaScript,Sql, Windows Administration.
Sunday, April 25, 2010
Drawing Pie Chart
Subscribe to:
Post Comments (Atom)
kırşehir
ReplyDeletegümüşhane
yozgat
kırıkkale
kocaeli
UH00