Elliptical form

Ddd
Posted by Ddd under Windows Forms category on | Points: 40 | Views : 2016
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 WindowsFormsApplication1
{
public partial class Form8 : Form
{
public Form8()
{
InitializeComponent();
}

private void Form8_Load(object sender, EventArgs e)
{
//Create an Object of GraphicsPath class

System.Drawing.Drawing2D.GraphicsPath g = new System.Drawing.Drawing2D.GraphicsPath();
//call the AddEllipse method
//0,0 are x and y coordinates of the
//rectangle that bounds the ellipse

//250 and 300 are width and height

g.AddEllipse(0,0,240,300);
this.Region = new Region(g);

}
}
}

Comments or Responses

Login to post response