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.

Comments

Popular posts from this blog

How to get column value from the selected row in data grid in wpf c#.net

How to make and use web service in Microsoft Dynamics Navision.

How to use Format function in Microsoft Dynamics Navision.