Hai all...
Small prob...I have drawn an ellipse onto the windowform...now i have to set right click event on the ellipse drawn..That is when i Right click the ellipse i have to set two options expand and collapse....
How am i go about it....
Thanks in advance..........
Drawellipse+click event
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Danatas GerviRank #4,152 · 361 reputationPosted Aug 2, 2009, 2:18 AM EDT
namespace EllipseRegionClick { public partial class Form1 : Form { Panel panelForClick; public Form1() { InitializeComponent(); panelForClick = new Panel(); GraphicsPath grPath = new GraphicsPath(); grPath.AddEllipse(10,20,100,80); Region EllipseRegion; EllipseRegion = new Region(grPath); panelForClick = new Panel(); panelForClick.Region = EllipseRegion; panelForClick.BackColor = Color.Brown; panelForClick.MouseClick += new MouseEventHandler(panelForClick_MouseClick); this.Controls.Add(panelForClick); } void panelForClick_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { // and so on; } } } }:-)