Breaking News
Loading...
Wednesday 16 January 2013

How to drew Different shapes using solid brush in c# .net

//*********************    CODE   ************************//

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 _119
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void panel1_Click(object sender, EventArgs e)
        {
            SolidBrush sb = new SolidBrush(Color.BlueViolet);
            Graphics g = panel1.CreateGraphics();

            // here parameter of fillrectangle is like ("x-axis , y-axis , width of rect. , height of rect.")
            //g.FillRectangle(sb, 0, 20, 50, 100);

            //g.FillEllipse(sb, 110, 20, 25, 50);


            //g.FillPie(sb, 20, 20, 60, 60, 0, 25);

            Point[] points={new Point(0,0),new Point(0,30),new Point(100,0)};
            g.FillPolygon(sb, points);
        }

       
    }
}


//////////////////////   OUTPUT  ////////////////////////////







--
/\/ir@\/  <(.'.)>


Also read :

        Nirav daraniya

   How to show hidden theme in win 7.

        How To Make "Star Design" In CMD Windows.

0 comments:

Post a Comment

Thanks for comment

 
Toggle Footer